2
我使用ExpandableListView和SimpleCursorTreeAdapter。有没有可能在bindChildView方法内获取当前小孩所属的组号?Android ExpandableListView在bindChildView中获取组编号
谢谢!
我使用ExpandableListView和SimpleCursorTreeAdapter。有没有可能在bindChildView方法内获取当前小孩所属的组号?Android ExpandableListView在bindChildView中获取组编号
谢谢!
我尝试另一种方法来获得组和儿童使用的位置getChildView:
@Override
public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent) {
ImageButton ib=null;
View v = super.getChildView(groupPosition, childPosition,isLastChild, convertView, parent);
ib=(ImageButton)v.findViewById(R.id.delete);
ib.setTag(R.id.TAG_GROUPPOS, groupPosition);
ib.setTag(R.id.TAG_CHILDPOS, childPosition);
return v;
}