gpt4 book ai didi

android - 检查 ExpandableListView 中的 Firstvisible item 是 Groupindicator?

转载 作者:行者123 更新时间:2023-11-29 22:17:58 25 4
gpt4 key购买 nike

能否判断ExpandableListView中firstvisible item是GroupIndicator View 还是其下的childView?请帮忙

提前致谢

最佳答案

终于成功了

int firstVisibleItem =  mExpListView.getFirstVisiblePosition();

long data = mExpListView.getExpandableListPosition(firstVisibleItem);
int type = mExpListView.getPackedPositionType(data);
if (type == ExpandableListView.PACKED_POSITION_TYPE_CHILD) {
Log.i("info", "childindicator");
}else
Log.i("info", "groupindicator");

关于android - 检查 ExpandableListView 中的 Firstvisible item 是 Groupindicator?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8050998/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com