Android Expandable ListView automatically scrolls to the bottom when I click on group

前端 未结 2 1658
忘掉有多难
忘掉有多难 2021-01-16 07:40

I have an ExpandableListView that is filled with items. When you click on an item on the top level it opens up the next level which shows a list that contains some additiona

相关标签:
2条回答
  • 2021-01-16 08:07

    I was facing the same problem and found the really simple solution here : [Android ExpandableListView Scroll to Expanded Group Position]

    Edit: Since the link dies once a month here the really simple solution: Just set the android:transciptMode="disabled". This prevents the scroll to the last list position.

    For further reading: Transcript mode in Android docs

    0 讨论(0)
  • 2021-01-16 08:21

    It's the standard ExpandableListView behavior. It tries to show all the items of the group that the user just expanded. In your case expanding groups 1-7 does not hide any children, but for other groups it does, so the list scrolls.

    0 讨论(0)
提交回复
热议问题