How to change width of SwitchCompat thumb

My question is about Android SwitchCompat.

This is my xml code :

<android.support.v7.widget.SwitchCompat
    app:switchMinWidth="@dimen/_108px"
    android:layout_width="@dimen/_108px"
    android:layout_height="@dimen/_60px"
    android:thumb="@drawable/switch_thumb_selector"
    app:track="@drawable/switch_track_selector" />

android:layout_width helps to set width of track, and android:layout_height helps to set height of thumb. But I want to set width of thumb. How to set width of thumb?


Source: android

Leave a Reply