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?
Android list view inside a scroll view auto scroll issue
Asked Answered
Add android:descendantFocusability="blocksDescendants"
to child of SrollView (and parent of ListView)
Works like a charm. +1 –
Pulver
It works, but not perfect! It will present the ListView first, then the top item, so it will have a flash... –
Skelly
© 2022 - 2024 — McMap. All rights reserved.
View
? – Shop