I have to develop one android application.
Here i have to develop grid view layout like:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:id="@+id/Layout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:id="@+id/status"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Mercuryminds Shoppingcart Application"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#040404"
android:gravity="center" />
<GridView
android:layout_height="wrap_content"
android:id="@+id/gridView1"
android:layout_width="match_parent"
android:numColumns="auto_fit"
android:horizontalSpacing="10dp"
android:verticalSpacing="10dp">
</GridView>
<include
android:id="@+id/footer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
layout="@layout/footer" />
</LinearLayout>
Here the layout footer is tab bar.
<?xml version="1.0" encoding="utf-8"?>
<TabHost
android:id="@android:id/tabhost"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:layout_width="match_parent"
android:id="@+id/linearLayout1"
android:layout_height="match_parent"
android:orientation="vertical">
<TabWidget
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@android:id/tabs">
</TabWidget>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@android:id/tabcontent">
</FrameLayout>
</LinearLayout>
</TabHost>
But i have to run the app means the tab bar is not display on my main view.whats wrong in my layout file.please help me.
add
layout_weight="1"to your gridView andlayout_height="0dp"like this