Skip to content

Migrate CheckBoxPreference to SwitchPreferenceCompat

Switches are used to

Use switches to:

  • Toggle a single item on or off, on mobile and tablet
  • Immediately activate or deactivate something

It's not essentially wrong to use a checkbox in the preference screen. However,

Use switches to turn an item on or off, especially on mobile instead of a checkbox. https://material.io/components/switches#usage

Both being selection controls, checkboxes syntactically convey the grouping concept, especially in the mobile environment.

Use checkboxes to:

  • Select one or more options from a list
  • Present a list containing sub-selections
  • Turn an item on or off in a desktop environment

https://material.io/components/checkboxes#usage

What's more, fdroidclient uses both of them to convey the same concept, in the same screen, which is chaos.

Edited by Hans-Christoph Steiner

Merge request reports