how to add the text "on" & "off" for the toggle button ? Do we need to add text also in image ?
You have a few options.
If you are using XML to generate the toggle button you would use android:textOn
and android:textOff
in your ToggleButton<>
Source: http://developer.android.com/reference/android/widget/ToggleButton.html#attr_android:textOn
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.