In Ice Cream Sandwich a Switch Widget was introduced that displays an On Off Slider.
I added the Switch like this:
<Switch
android:layout_width="fill_parent"
android:layout_height="48dp"
android:textStyle="bold"
android:thumb="@drawable/switch_thumb_selector"
android:track="@drawable/switch_bg_selector" />
The track and thumb drawables are nine patch images that should scale to all possible sizes.
I hoped that the Switch would scale to the maximum size inside the given bounds, but it seems as if the drawables are just centered inside the supplied space.
Is it possible to increase the size of the Switch to make it appear bigger?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…