5

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?

Soyeon Kim
  • 608
  • 7
  • 34

0 Answers0