从ExpandableListView中的id获取项目索引

Ale*_*kov 5 android

我需要在使用ExpandableListView时获取项目的索引(位置)知道其ID.如果没有完整的哈希id->索引并搜索它,有没有办法做到这一点?

谢谢

Ale*_*voy 3

getPackedPositionForChild()
Run Code Online (Sandbox Code Playgroud)

getFlatListPosition()
Run Code Online (Sandbox Code Playgroud)

ExpandableListView 上有你的朋友