現在、Tabhostを使用して3つのタブを作成し、RelativeLayoutを使用して最初のタブを作成してListViewを作成する単純なAndroidアプリケーションで作業していますが、ListViewが表示されないため、ListViewの背景色(白)を設定しようとしました。 ListViewは表示されていませんが、同じ結果が得られるので、Androidのタブバーでリストビューを設定する方法を教えてください。
前もって感謝します
私はこれを試しました
<?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>