<ToggleButton android:id="@+id/tv_pmpSwitch" android:layout_width="0dp" android:layout_height="28dp" android:layout_weight="0.1" android:background="@drawable/toggle_view" android:textOff="" android:textOn="" />
Try this on your code and adjust only the layout height parameter!
EDIT
The way to get an unstretched image is to use a bitmap, not a drawing. use the following as your xml as background.
<?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android" > <item > <bitmap android:src="@drawable/ic_list_action" android:gravity="center_vertical|left" /> </item> <item> <bitmap android:src="@drawable/ic_grid_action" android:gravity="center_vertical|left" /> </item> </layer-list>
source share