Wie Sie festlegen, android zeigen vertikale Ausrichtung?
Vom folgenden .xml-Datei, die ich eingestellt xml zu zeigen TabHost aber nachdem ich es auf dem emulator es zeigen beide die Orientierung. ich möchte, um es zu zeigen, ist nur eine Orientierung. Wie kann ich das tun? Vielen, vielen Dank.
<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:orientation="vertical">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<FrameLayout android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentTop="true"
android:layout_above="@android:id/tabs" />
<TabWidget android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" />
</RelativeLayout>
</TabHost>
Du musst angemeldet sein, um einen Kommentar abzugeben.
fügen Sie diese Zeile in Ihre manifest.xml Datei.
wenn Sie möchten, dass nur Querformat wechseln dann zu
landscape
stattportrait
In diesem
android:screenOrientation="portrait"
in Ihrer Aktivität in der manifest .In der AndroidMainfeast.xml Datei
Sie werden sehen,
Fügen Sie daher nach .MainActivity
android:configChanges="" helfen Sie uns zu verhindern, onpause() und OnResume () - Methode auf, wenn wir aus der Drehung.