2

I want to show transparent blurred tabs, so that listactivity screen behind it shows blurred images enter image description here

And tabs without divider.

ROHIT PARMAR
  • 901
  • 15
  • 26

1 Answers1

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>
Pang
  • 9,564
  • 146
  • 81
  • 122
Amit Gupta
  • 1,067
  • 13
  • 26