Reputation: 279
I have a listview and button in a scrollview. When i scroll both list and button loses focus. When i tap on button it did not work but next time i tap it works i think button loses focus and focus is towards scrollview how to handle this please help
Upvotes: 1
Views: 518
Reputation: 2004
Scroll view can have only one child, put your button and listview in common layout and try out.
Upvotes: 0
Reputation: 7989
Never put ListView
inside a ScrollView
. ListView
handles scrolling, and wrapping it in a ScrollView
can cause problems with focus, touch-events etc. If you want other Views
added to the top or bottom of you list, simply use ListView.addHeaderView()
or ListView.addFooterView()
Upvotes: 1