Android SwitchCompat style

前端 未结 1 726
忘掉有多难
忘掉有多难 2021-01-20 06:26

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.Swit

1条回答
  •  遇见更好的自我
    2021-01-20 06:48

    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:

    
    

    And you should be able to customize the size, color, etc of your "OFF" text.

    0 讨论(0)
提交回复
热议问题