• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Using a ListView in a ScrollView

Right now I have a design that I think would be served best by using a ListView inside of a ScrollView, but apparently that isn't supposed to be done.

I want something that will look like this.

<TEXT>
<LOOOOONG TEXT>
<list of items generated at runtime>

I already have code written to generate the list of items as a ListView, because I use it that way elsewhere in my app, but since this screen has long text above it sometimes the list gets cut off.

If I use a ScrollView to scroll through the long text, the ListView breaks.

Is there anything I can do?
 
Your problem is very common, I'm with the same problem here.

U
nfortunately, there is an UNsolved issue with ListView inside a ScrollView (and Google knows it), see here (Layout Problem Listview in Scrollview - Android Beginners | Google Groups), here (Android ScrollView layout problem - Stack Overflow), and here (Scrolling with Multiple ListViews for Android - Stack Overflow), none of all solutions provided could resolve this issue.

They say that it's your problem, you never could put listView inside a scrollView, but there is not NONE workaround of this problem coming from google yet, besides third providers solution's does not works always...

Anyone already has this problem?
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones