We can change the default state of Switch by using android:checked attribute. We can add a Switch to our application layout by using Switch object.įollowing is the pictorial representation of using Switch in android applications.īy default, the android Switch will be in the OFF ( Unchecked) state. The Switch element is useful for the users to change the settings between two states either ON or OFF. By using thumb, the user may drag back and forth to choose an option either ON or OFF. In android, Switch is a two-state user interface element that is used to display ON ( Checked) or OFF ( Unchecked) states as a button with thumb slider.
0 Comments
Leave a Reply. |