1. Download our Official Android App: Forums for Android!

Apps Using a ListView in a ScrollView

Discussion in 'Android Development' started by ElPresPufferfish, Jul 16, 2009.

  1. ElPresPufferfish

    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    1
    Joined:
    Jul 16, 2009

    Jul 16, 2009
    1
    0
    5
    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?
     

    Advertisement

  2. Profete162

    Profete162 Lurker
    Rank:
    None
    Points:
    5
    Posts:
    9
    Joined:
    Dec 18, 2009

    Dec 18, 2009
    9
    0
    5
    Exactly the same problem and need help too..
     
  3. carlosmacieljrpe

    Rank:
    None
    Points:
    5
    Posts:
    2
    Joined:
    Jul 19, 2010

    Jul 19, 2010
    2
    0
    5
    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?
     
  4. cp1

    cp1 Android Enthusiast
    Rank:
    None
    Points:
    53
    Posts:
    375
    Joined:
    Apr 30, 2010

    Apr 30, 2010
    375
    35
    53
    Can you set it so that your text / long text only take up the first half of the screen? Then you can scroll that and scroll the list below it.
     
  5. carlosmacieljrpe

    Rank:
    None
    Points:
    5
    Posts:
    2
    Joined:
    Jul 19, 2010

    Jul 19, 2010
    2
    0
    5
    Thanks for your reply cp1. The problem also appear when you have a lot of components on screen and in the end one ListView. This is the my problem. I could not change the screen layout.

    Att,

    Carlos Maciel
     
  6. Nex_otaku

    Nex_otaku Lurker
    Rank:
    None
    Points:
    5
    Posts:
    1
    Joined:
    Dec 8, 2010

Share This Page

Loading...