本文整理了Java中android.widget.ExpandableListView.getHeaderViewsCount()
方法的一些代码示例,展示了ExpandableListView.getHeaderViewsCount()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ExpandableListView.getHeaderViewsCount()
方法的具体详情如下:
包路径:android.widget.ExpandableListView
类名称:ExpandableListView
方法名:getHeaderViewsCount
暂无
代码示例来源:origin: stackoverflow.com
groupList, laptopCollection);
expListView.setAdapter(expListAdapter);
expListView.getHeaderViewsCount();
代码示例来源:origin: stackoverflow.com
, groupList, laptopCollection);
expListView.setAdapter(expListAdapter);
expListView.getHeaderViewsCount();
代码示例来源:origin: nailperry-zd/LazierTracker
private static String buildAdapterViewItemIndex(View child, ViewGroup group) {
int index = ((AdapterView) group).getPositionForView(child);
// ExpandableListView
if (group instanceof ExpandableListView) {
StringBuilder element = new StringBuilder();
String exListIndicator = "";
ExpandableListView _group = (ExpandableListView) group;
long l = _group.getExpandableListPosition(index);
int groupIndex;
if (ExpandableListView.getPackedPositionType(l) == ExpandableListView.PACKED_POSITION_TYPE_NULL) {
if (index < _group.getHeaderViewsCount()) {
exListIndicator = "[header:" + index + "]";// header
} else {
groupIndex = index - (_group.getCount() - _group.getFooterViewsCount());
exListIndicator = "[footer:" + groupIndex + "]";// footer
}
} else {
groupIndex = ExpandableListView.getPackedPositionGroup(l);
int childIndex = ExpandableListView.getPackedPositionChild(l);
if (childIndex != -1) {
exListIndicator = "[group:" + groupIndex + ",child:" + childIndex + "]";// group/child
} else {
exListIndicator = "[group:" + groupIndex + "]";// group
}
}
Log.d("ExpandableListViewItem", "@index = " + index + ", @exListIndicator = " + exListIndicator);
return exListIndicator;
}
return "[" + index + "]";
}
内容来源于网络,如有侵权,请联系作者删除!