Android Switchcompat Style
I tested my app on my new device with android 5.1.1. In my SettingsActivity i have a switch. I already read some posts and changed it to android.support.v7.widget.SwitchCompat but
Solution 1:
Using SwitchCompat.setSwitchTextAppearance
you can set the style for the text that appears inside the switch itself.
Add a style something like this and set it using setSwitchTextAppearance
:
<stylename="SwitchTextAppearance"parent="TextAppearance.AppCompat.Widget.Switch"><itemname="android:textSize">12sp</item><itemname="android:textColor">#3F51B5</item></style>
And you should be able to customize the size, color, etc of your "OFF" text.
Post a Comment for "Android Switchcompat Style"