1. Are you ready for the Galaxy S20? Here is everything we know so far!

Layout Help!!

Discussion in 'Android Development' started by Adamsklan, Aug 17, 2010.

  1. Adamsklan

    Adamsklan Lurker
    Thread Starter

    Hey all! I'm new to the android world but not new to java at all. I basically am having atough time getting my head around the layouts though.

    I basically followed List View | Android Developers
    that tutorial to create a list of data.. Now I would like to add that list of data to an existing tab which I have created using Tab Layout | Android Developers that tutorial.

    I can't seem to figure out how to add my DataListView class to my DataViewTab class. In java layouts i would just create a box layout for DataViewTab and add the DataViewList class object to the BoxLayout...

    Thanks!
     


  2. blundell

    blundell Well-Known Member

    Whats up with ya?

    Code (Text):
    1.  
    2. <?xml version="1.0" encoding="utf-8"?>
    3. <TabHost
    4.         xmlns:android="http://schemas.android.com/apk/res/android"
    5.         xmlns:app="http://schemas.android.com/apk/res/com.blundell.fpsdoug.free"
    6.     android:id="@android:id/tabhost"
    7.     android:layout_width="fill_parent"
    8.     android:layout_height="fill_parent">
    9.         <TabWidget
    10.         android:id="@android:id/tabs"
    11.         android:layout_width="fill_parent"
    12.         android:layout_height="wrap_content"
    13.         />
    14.         <FrameLayout
    15.          android:id="@android:id/tabcontent"
    16.          android:layout_height="fill_parent"
    17.          android:layout_width="fill_parent">
    18.                  <LinearLayout
    19.                                 android:id="@+id/linearlayoutTab1"
    20.                                 android:layout_width="fill_parent"
    21.                                 android:layout_height="wrap_content"
    22.                                 android:orientation="vertical"
    23.                                 >
    24.                                 <ListView
    25.                                     android:id="@+id/listView"
    26.                                     android:layout_width="fill_parent"
    27.                                     android:layout_height="wrap_content"
    28.                                     android:entries="@array/blah"
    29.                                   />
    30.                 </LinearLayout>
    31.                 <LinearLayout
    32.                                 android:id="@+id/linearlayoutTab2"
    33.                                 android:layout_width="fill_parent"
    34.                                 android:layout_height="wrap_content"
    35.                                 android:orientation="vertical"
    36.                                 >
    37.                 </LinearLayout>
    38.         </FrameLayout>
    39. </TabHost>
    40.  
     
  3. Adamsklan

    Adamsklan Lurker
    Thread Starter

    Well that worked to the point where I can see my list, but the list is being overlayed on top of the tab layout so I cant click any tabs, i can only select list items... Should there be any specific code in the class for the tab which I want to display the list?
     
Loading...
Similar Threads - Layout Help
  1. sariDon2
    Replies:
    0
    Views:
    128
  2. workbench
    Replies:
    3
    Views:
    239
  3. Mahmudul001
    Replies:
    0
    Views:
    451
  4. beez zaen
    Replies:
    0
    Views:
    378
  5. OM2
    Replies:
    2
    Views:
    406
  6. mahaju
    Replies:
    0
    Views:
    407
  7. umtblbl
    Replies:
    1
    Views:
    320
  8. Aznoh
    Replies:
    0
    Views:
    327
  9. ahmedjamilcs
    Replies:
    2
    Views:
    370
  10. Xenøçrates
    Replies:
    2
    Views:
    1,321

Share This Page

Loading...