I have read a number of literatures that say not to do this. But they have yet to offer an alternative solution. The question seems to come up a lot, though. Here is my problem.
I want my main layout to be scrollable (this is because it will have more views than can fit the screen). My main layout is a vertical LinearLayout. So for now I have it inside a ScrollView.
one of the many children of my LinearLayout is a ListView (shows 3 items, user scrolls the ListView for more).
You can image the other children of my LinearLayout to be whatever will convince you that I need this to work: for example, one may be a scrollable horizontal LinearLayout; another may be a ViewPater; etc.
Now if the content of my LinearLayout could all fit the screen at once, I would have no problem. But I have about six different children in my LinearLayout and only about three are visible at one time. So, yes, I do need to be able to scroll my LinearLayout.
One more thing. If I am scrolling the child ListView and I reach the end, I need the parent LinearLayout to resume control and start scrolling as user scrolls.
CLARIFICATION
One clarification is that my ListView is actually dynamically added to a ViewPager. So technically, a ViewPager is the child of my LinearLayout. But then inside the ViewPager, one of the pages is a ListView.
NOTE
By the way, I have read scrolling ListView within ScrollView. The answer there is good, but I still have a few problems.
once edge of ListView is reached control does not revert to ScrollView
If any of the other child views of the LinearLayout have a click listener, then I cannot use them to scroll the ScrollView. So basically for most of the screen, the scroll view is not scrollable.