I’ve read many posts indicating how a ListView should not be nested within ScrollView.
I was wondering if this applies to all AdapterView’s in general ?
It’d be helpful to know before finding out after writing a whole bunch of code for a custom list view that will be nested in a ScrollView. I want to base it on an AdapterView so that I can use it similarly to a standard ListView (to help minimize re-write of my current ListView related code).
Thank you.
On the whole,
ScrollViewdoes not play nice with the other kids.There is no need to put a
ListViewin aScrollView. Just put the other stuff from theScrollViewinto theListViewitself, either as header/footer views, or using myMergeAdapter, or similar techniques.Creating a custom
AdapterViewfrom scratch is not easy. If you look at the source forListView, and itsAbsListViewimmediate parent, there are several thousand lines of code. It would be much simpler to just put the contents of theScrollViewinto theListView, per my preceding paragraph.