0
私は下部タブのレイアウトを持っています。しかし、私はtabHostの上にストリップを設定することができません。どうやってするの?ありがとうございました。アンドロイド下部にタブストリップが表示されますtabHost
ここに私のメインのレイアウト:
<?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"
>
<LinearLayout
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="wrap_content"
android:layout_weight="1" >
</FrameLayout>
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
/>
</LinearLayout>
</TabHost>
ともタブのスタイルのためのセレクタ:
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" >
<shape>
<gradient
android:startColor="#aa3434"
android:endColor="#432233"
android:angle="270"
/>
</shape>
</item>
<item android:state_selected="true" >
<shape>
<gradient
android:startColor="#aa3434"
android:endColor="#432233"
android:angle="270" />
</shape>
</item>
が、変更なしを試してみてください。 ( – Jaume
このコードは既に私のプロジェクト –
の下部にあるタブを使って実装していますか? – Jaume