ich erstellen ein TabHost von XML und rufen es in einer Aktivität mit findViewByID(). Ich lege die Schwerkraft von Tabhost und Tabwidget richtig, aber es ist nicht Arbeit, wie kann ich es funktionieren lassen?android: TabHost Schwerkraft ist keine Arbeit
Hinweis: i aufgerufen dieses XML-Layout in Aktivität nicht in TabActivity
Hier ist die XML-Datei von Layout, Vielen Dank im Voraus
<?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>
funktioniert, wo soll ich es verwenden, da es keine android ist: Schwerkraft in TabHost aber es gibt android: layout_gravity –
gesetzt, dies zu Ihrem ** ** ... Linearlayout – waqaslam