TabWidget中的背景透明度

时间:2015-04-25 13:54:50

标签: android xml android-tabhost tabwidget

当我将tabWidget设置为透明时,它只会更改它的阴影颜色。 我用这个:

  

0%(透明) - > #00 in hex 20% - > #33 50% - > #80 75% - > #C0 100%   (不透明) - > #FF

这是我的xml:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >

    <TabHost
        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="0dip"
                android:layout_weight="1" 
                />

            <TabWidget
                android:id="@android:id/tabs"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_weight="0"
                android:alpha="20"
                android:background="#D9214075" />

        </LinearLayout>
    </TabHost>



</RelativeLayout>

0 个答案:

没有答案
相关问题