Android ExpandableListView Scroll to Expanded Group Position

 

Once I had this problem: I had an ExapandableListView with groups and children. When I wanted to expand a group the list was scrolling to the end every time. After a little search I’ve figured it out what the problem was. In my xml file where my ExpandableListView was created, I had this attribute:

android:transcriptMode="alwaysScroll"

So I changed it to this:

android:transcriptMode="disabled"

And the problem was solved. When I expanded a group from the ExpandableListView, the list was scrolling to the group I had expanded.

So if it happens to you to have this problem too, please consider this solution even if you don’t have the transriptMode attribute, just put it in your xml code as disabled, it might work for you too :)

2 thoughts on “Android ExpandableListView Scroll to Expanded Group Position”

  1. Thanks a lot, i had the same problem and i search for hours in the www and now it works! Thank You!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>