build.gradle
в корневой директории проекта,allprojects {
repositories {
maven {
url 'https://s01.oss.sonatype.org/content/repositories/releases/'
}
}
}
build.gradle
модуля entry,dependencies {
implementation('com.gitee.chinasoft_ohos:expandableHeightListView:1.0.0')
...
}
Проект можно запустить непосредственно в SDK6, DevEco Studio2.2 Beta1.
Если проект не запускается, удалите файлы .gradle
, .idea
, build
, gradle
, build.gradle
,
и создайте новый проект в соответствии с вашей версией, затем скопируйте соответствующие файлы нового проекта в корневую директорию.#### Инструкция по использованию
<com.github.paolorotolo.expandableheightlistview.ExpandableHeightListView
ohos:id="$+id:expandable_listview"
ohos:height="match_content"
ohos:long_click_enabled="false"
ohos:width="match_parent"
ohos:padding="8vp">
</com.github.paolorotolo.expandableheightlistview.ExpandableHeightListView>
ExpandableHeightListView expandableListView = (ExpandableHeightListView) findComponentById(ResourceTable.Id_expandable_listview);
for (int i = 0; i <= 20; i++) {
arrayList.add(i);
}
expandableListView.setExpanded(true);
expandableListView.setProvider(this, arrayList);
<com.github.paolorotolo.expandableheightlistview.ExpandableHeightGridView
ohos:id="$+id:expandable_gridview"
ohos:height="match_content"
ohos:width="match_parent"
ohos:long_click_enabled="false"
ohos:padding="8vp">
</com.github.paolorotolo.expandableheightlistview.ExpandableHeightGridView>
gridListContainer = (ExpandableHeightGridView) findComponentById(ResourceTable.Id_expandable_gridview);
ArrayList<Integer> arrayList = new ArrayList<>();
for (int i = 0; i <= 20; i++) {
arrayList.add(i);
}
int padding = gridListContainer.getPaddingLeft() + gridListContainer.getPaddingRight();
DirectionalLayout componentParent = (DirectionalLayout) gridListContainer.getComponentParent();
int paddingPar = componentParent.getPaddingLeft() + componentParent.getPaddingRight();
gridListContainer.setExpanded(true);
gridListContainer.setProvider(3, arrayList, padding, paddingPar);
Проверка кода CodeCheck прошла успешно.Проверка кода CloudTest прошла успешно
Проверка на вирусы прошла успешно
Функционал демонстрационной версии практически не отличается от оригинального компонента
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Комментарии ( 0 )