How to change width of SwitchCompat thumb

时间:2015-10-06 08:54:36

标签: android xml android-switch switchcompat

My question is about Android SwitchCompat.

Style that I want to :

enter image description here

But my switch's style is :

enter image description here

My thumb's width is something wrong. (Please never mind track size)

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?

0 个答案:

没有答案