Child selection in ExpandableListView

后端 未结 2 1193
慢半拍i
慢半拍i 2021-01-14 13:44

In an ExpandableListView is it possible to initially select a child item so that the containing group is expanded and the list is scrolled to this child\'s posi

2条回答
  •  [愿得一人]
    2021-01-14 14:10

    Add a call to listView.expandGroup() before setSelectedChild().

    The shouldExpandGroup parameter set to true in setSelectedChild() seems only to work if there's at least one group expanded in the first place.

提交回复
热议问题