ExpandableListView 的位置对应关系 绝对位置 flatPosition 就是scroll 时对应的位置
要转化成对应的 group child position
packPosition=ExpandableListView . getExpandableListPosition(flatPosition );
//判断位置类型 是group 还是child
ExpandableListView.getPackedPositionType(packPosition) == ExpandableListView.PACKED_POSITION_TYPE_GROUP
ExpandableListView.getPackedPositionType(packPosition) == ExpandableListView.PACKED_POSITION_TYPE_CHILD
ExpandableListView.getPackedPositionType(packPosition) == ExpandableListView.PACKED_POSITION_TYPE_NULL
groupPosition = ExpandableListView.getPackedPositionGroup(packPosition);// group节点位置
childPosition = ExpandableListView.getPackedPositionChild(packPosition);// child节点位置
逆向转换
getFlatListPosition(ExpandableListView.getPackedPositionForChild(groupPosition, childPosition)))
就能得到绝对位置