Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When to use CheckBox and when Switch

Can anyone can tell me when to use Checkbox and when Switch?

I mean, what is the real login difference between the two in the context of a PreferenceActivity?

For example, will you change the next section to Checkboxes? It's part of a set, but using a Switch here looks better.

enter image description here

like image 769
David Avatar asked Jan 20 '14 10:01

David


People also ask

In what situations might you use a toggle button vs a switch control vs a checkbox?

Use a toggle switch for binary settings when changes become effective immediately after the user changes them. Use a checkbox when the user has to perform extra steps for changes to be effective.

Why toggle tokens are a better alternative to checkboxes?

Toggle tokens conserve screen space, so you have room for more content, and users don't have to scroll. Checkboxes require vertical stacking, but toggle tokens allow for both vertical and horizontal stacking. This creates a compact arrangement that looks less intimidating to users.

Is a checkbox a toggle?

Toggle, switch, and checkboxOther names used for this component are toggle switch, checkbox toggle, toggle button… All of them behave basically in the same way: a control used to switch between two states (often on or off).

Is like a toggle switch when users can select a desired choice by clicking on the checkbox?

The toggle switch represents a physical switch that allows users to turn things on or off, like a light switch. Tapping a toggle switch is a two-step action: selection and execution, whereas checkbox is just selection of an option and its execution usually requires another control.


1 Answers

I actually find this to be quite an interesting question, particularly considering that one can easily emulate the functionality of a switch using a checkbox in Android.

According to the Android developers guide, a checkbox is simply a type of switch. Check the quotes below or read the full description here.

Checkboxes: Checkboxes allow the user to select multiple options from a set. Avoid using a single checkbox to turn an option off or on. Instead, use an on/off switch.

On/off Switches: On/off switches toggle the state of a single settings option.

like image 73
Kent Hawkings Avatar answered Oct 19 '22 22:10

Kent Hawkings