make LinearLayout have a ListView Look


Last Updated:

  1. motoko

    motoko Member This Topic's Starter

    Joined:
    Jun 26, 2010
    Messages:
    11
    Likes Received:
    0
    Hello all, am new to android, so i was wondering if you guys could please help me out because i have no idea how to go about this. i am trying to create a number of rows in a LinearLayout but i want it to look like a ListView. Is there a way i can do this without using a ListView, since i already have a fixed amount of rows. Please any help or tip will be greatly appreciated as i have not yet found any tutorial on the internet.

    thank you
     

    Advertisement
  2. Boogs

    Boogs Well-Known Member

    Joined:
    Apr 6, 2010
    Messages:
    85
    Likes Received:
    16
    You can just stack a whole bunch of Linear Layouts on top of each other with lines in between and pack the whole thing inside a scroll view. That would give you a look of the settings pages that you see in the normal Android settings menus. Is that what you're talking about?
     
  3. motoko

    motoko Member This Topic's Starter

    Joined:
    Jun 26, 2010
    Messages:
    11
    Likes Received:
    0
    yes, thats what i am talking about. thanks a bunch
     
  4. tdieckman

    tdieckman Well-Known Member

    Joined:
    Sep 30, 2009
    Messages:
    49
    Likes Received:
    5
    If you just want the look of the settings screens, use a PreferencesActivity. It'll do all the work for you including loading and saving the values.
     
  5. motoko

    motoko Member This Topic's Starter

    Joined:
    Jun 26, 2010
    Messages:
    11
    Likes Received:
    0
    Thanks. Will try that out, never would have thought of using preference activity.
     

Share This Page

Loading...