0
私はXMLでTabHostを作成し、それをfindViewByID()を使ってアクティビティで呼び出す。 私はtabhostとtabwidgetの重力を正しく置くことができますが、それは動作しません、どうすればそれを動作させることができますか?アンドロイド:TabHost重力が働かない
注:私は、レイアウトの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>
を動作するかどうかを確認するとともに、これを含める:tabhostにおける重力しかしアンドロイドがあります:layout_gravity –
はあなたの**のLinearLayout **にこれを設定し... – waqaslam