android switch button example

Published: 25 March 2018
on channel: bostam win
3,641
32

android bangla tutorial switch Android Switch Button Tutorial android switch control switch button in android example android switch button Android switch
Android switch button
Switch (On/Off) Tutorial For Example In Android Studio
In Android, Switch is a two-state toggle switch widget that can select between two options. It is used to display checked and unchecked state of a button providing slider control to the user. The switch is a subclass of CompoundButton. It is basically an off/on button which indicates the current state of Switch. It is commonly used in selecting on/off in Sound, Bluetooth, WiFi etc

textOn And testOff:

textOn attribute is used to set the text when Switch is in the checked state (i.e. on state). We can set the textOn in XML as well as in the java class.
In the below example we set the textOn as “Yes” and text of as “No” for a Switch.


On this page of the site you can watch the video online android switch button example with a duration of hours minute second in good quality, which was uploaded by the user bostam win 25 March 2018, share the link with friends and acquaintances, this video has already been watched 3,641 times on youtube and it was liked by 32 viewers. Enjoy your viewing!