althaf_tvm
althaf_tvm

Reputation: 773

Android list view inside a scroll view auto scroll issue

I have an android layout setup where I have a ScrollView with some elements and inside that I have a ListView. I am using StackOverflow's answer Android list view inside a scroll view for achieving this feature and it's working fine. My ListView is below some elements like TextView, ImageView. Problem is that when the page is presented ListView get scrolled automatically so that first item in listView is at the top (ie whole scrollview gets scrolled to present listview first item). How can I avoid this auto scrolling?

Upvotes: 6

Views: 2554

Answers (1)

Alex
Alex

Reputation: 713

Add android:descendantFocusability="blocksDescendants" to child of SrollView (and parent of ListView)

Upvotes: 32

Related Questions