Я создаю TabHost с помощью XML и вызываю его в Activity, используя findViewByID ().я установил правильность гравитации tabhost и tabwidget, но это не работает, как я могу заставить его работать?
Примечание: я вызвал этот макет Xml в Activity, а не в TabActivity
Здесьэто XML-файл макета, спасибо заранее
<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent" android:layout_gravity="right" android:foregroundGravity="right" >
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@android:color/white">
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="30dp"
android:background="@drawable/submenu_bg" android:layout_gravity="right"/>
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<ProgressBar
android:id="@+id/loading_secondary_tabs"
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_gravity="center" />
</FrameLayout>
</LinearLayout>
</TabHost>