2

我想显示透明的模糊选项卡,以便它后面的 listactivity 屏幕显示模糊图像在此处输入图像描述

和没有分隔线的标签。

4

1 回答 1

1

I found a solution by removing item selector background from deselect event and the image you want to set in background of tab group just use that image by using set background resource.

In selector make change

<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="@drawable/selected_tab" android:state_selected="true" />
    <item android:drawable="@android:color/transparent" />
</selector>

in tab host make following change

<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:background="#000000" >
   <RelativeLayout
       android:id="@+id/linearLayoutTab"
       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" />
       <TabWidget
           android:id="@android:id/tabs"
           android:layout_width="fill_parent"
           android:layout_height="wrap_content"
           android:layout_alignParentBottom="true"
           android:layout_marginBottom="-10dp"
           android:tabStripEnabled="true"
           android:background="@drawable/unselected_tab"/>
   </RelativeLayout>
</TabHost>
于 2013-12-24T06:38:32.233 回答