Skip to content

Instantly share code, notes, and snippets.

@nitindhar7
Created January 31, 2012 03:24
Show Gist options
  • Save nitindhar7/1708550 to your computer and use it in GitHub Desktop.
Save nitindhar7/1708550 to your computer and use it in GitHub Desktop.
A custom tab view
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/tab"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_gravity="left"
android:orientation="vertical" >
<TextView
android:id="@+id/tabLabel"
android:layout_width="fill_parent"
android:layout_height="43dp"
android:gravity="center_vertical|center_horizontal"
android:textColor="#FFF"
android:textSize="14sp" />
<TextView
android:id="@+id/tabSelectedDivider"
android:layout_width="fill_parent"
android:layout_height="5dp"
android:layout_alignParentBottom="true"
android:background="#3366CC"
android:visibility="gone" />
<TextView
android:id="@+id/tabDivider"
android:layout_width="fill_parent"
android:layout_height="2dp"
android:layout_alignParentBottom="true"
android:background="#3366CC" />
<TextView
android:id="@+id/tabSplitter"
android:layout_width="1px"
android:layout_height="23dp"
android:layout_alignParentRight="true"
android:layout_marginTop="10dp"
android:background="#333" />
</RelativeLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment