However, I might not be taking the best approach, but this is how I have created some Switch like UIs in few of my apps. Here is the code – <RadioGroup android:checkedButton=”@+id/offer” android:id=”@+id/toggle” android:layout_width=”match_parent” android:layout_height=”30dp” android:layout_marginBottom=”@dimen/margin_medium” android:layout_marginLeft=”50dp” android:layout_marginRight=”50dp” android:layout_marginTop=”@dimen/margin_medium” android:background=”@drawable/pink_out_line” android:orientation=”horizontal”> <RadioButton android:layout_marginTop=”1dp” android:layout_marginBottom=”1dp” android:layout_marginLeft=”1dp” android:id=”@+id/search” android:background=”@drawable/toggle_widget_background” android:layout_width=”0dp” android:layout_height=”match_parent” android:layout_weight=”1″ android:button=”@null” android:gravity=”center” android:text=”Search” android:textColor=”@color/white” /> … Read more