代码之家  ›  专栏  ›  技术社区  ›  Alexander Oleynikov

从ExpandableListView中的id获取项的索引

  •  5
  • Alexander Oleynikov  · 技术社区  · 16 年前

    我需要让项目的索引(位置)知道它的ID,而使用ExpandableListView。 有没有办法不做完整的哈希id->索引和搜索?

    1 回复  |  直到 16 年前
        1
  •  3
  •   Alex Volovoy    16 年前
    getPackedPositionForChild()
    

    和

    getFlatListPosition()
    

    在ExpandableListView上是您的朋友