Skip to content

Make plugin settings use material design

Summary

Update the plugin settings screen from the Android 4 style to the Android 5+ Material Design one.

The screen was using checkboxes to enable/disable plugins, but didn't have a "save" button. According to Material Design, this is misleading because checkboxes should not have any effect on their own and need a separate button to have an effect. I replaced the checkboxes with switches to fix this.

This MR makes the plugin settings screen use the same familiar UI as the Android OS settings app. For comparison, open the Settings app to the "Network & Internet" page and look at the "Wi-Fi" and "Airplane mode" rows.

Here are all the UI changes:

Before After
Checkboxes present to the left. Tapping toggles enabled/disabled Switches present to the right. Tapping toggles enabled/disabled
Settings icon present to the right when plugin enabled and details available Divider present between text and switch when plugin enabled and details available
Settings icon greyed out when plugin disabled but details available This has been simplified away. If details are available, the divider will still be hidden until the plugin is enabled
Tapping on settings icon (if present) opens details screen Removed settings icon. Tap the text to open details screen
Tapping on text always toggles enabled/disabled Tapping on text opens details screen (if possible, i.e. divider present), else toggles enabled/disabled
Ripple for entire row Ripple for each clickable area. This would be the entire row if plugin disabled or details unavailable. Otherwise, separate ripple for text and switch

Test Plan

Before:

Screenshot_20200429-230746

After:

Screenshot_20200429-230637

Merge request reports