First create a xml file bottom_tabs.xml
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#FFFFFF" >
android:id="@+id/linearLayoutTab"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="0" />
android:id="@+id/realtabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1" />
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="#00000000"
android:tabStripEnabled="true" />
Add the background image to tab icon like as:
mTabHost.getTabWidget().getChildAt(0)
.setBackgroundResource(R.drawable.d_tab_bg_selector);
d_tab_bg_selector code:
d_pressed_state source code:
android:top="8dp">
Write your own code for your unpressed state.