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

Apps Layout Help!!

Adamsklan

Lurker
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!
 
Whats up with ya?

Code:
<?xml version="1.0" encoding="utf-8"?>
<TabHost
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res/com.blundell.fpsdoug.free"
    android:id="@android:id/tabhost"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
        <TabWidget
        android:id="@android:id/tabs"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" 
        />
        <FrameLayout
         android:id="@android:id/tabcontent"
         android:layout_height="fill_parent"
         android:layout_width="fill_parent">
                 <LinearLayout
                                android:id="@+id/linearlayoutTab1"
                                android:layout_width="fill_parent"
                                android:layout_height="wrap_content"
                                android:orientation="vertical"
                                >
                                <ListView 
                                    android:id="@+id/listView" 
                                    android:layout_width="fill_parent" 
                                    android:layout_height="wrap_content" 
                                    android:entries="@array/blah"
                                  />
                </LinearLayout>
                <LinearLayout
                                android:id="@+id/linearlayoutTab2"
                                android:layout_width="fill_parent"
                                android:layout_height="wrap_content"
                                android:orientation="vertical"
                                >
                </LinearLayout>
        </FrameLayout>
</TabHost>
 
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?
 
Back
Top Bottom