Currently i am working in simple Android application, using Tabhost, to create three tabs and the first tab using RelativeLayout to create ListView, but the ListView not visible, , so i tried to set background color (white) for ListView, shown only white color the ListView not shown, but the same result comes, so please help me, How to set a list view in Tabbar in Android.
Thanks in Advance
I tried this
<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<RelativeLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TabWidget android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_alignParentBottom = "true"
android:layout_height="wrap_content"
/>
<FrameLayout android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tab1"
android:layout_width="fill_parent"
android:layout_height="200dip" >
<ListView
android:id="@+id/edittext01"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:background="#ffff"
android:paddingTop="10px" />
</RelativeLayout>
you actually need to specify ListView position according to tabs as you want them above then use RelativeLayout property
android:layout_above="id_of_FrameLayout_containing_ListView "which displays your list as you want.And for content within ListView check that items you added are added correctly and if using AdapterClass for drawing each List Item..
hope this explanation works for you…