- Should a toggle button show its current state or the state to which it will change?
- How does a toggle button work?
Should a toggle button show its current state or the state to which it will change?
If you are just going to have one button to toggle between two states, then the button should represent the next state, because that is the action that the button will take when clicked.
How does a toggle button work?
A toggle button allows the user to change a setting between two states. You can add a basic toggle button to your layout with the ToggleButton object. Android 4.0 (API level 14) introduces another kind of toggle button called a switch that provides a slider control, which you can add with a Switch object.