Jules Aguillon
5822f98bbb
Migrate layouts preferences
...
The new `layouts` preference replaces three previous preferences:
layout
second_layout
custom_layout
Add a preference migration function, which first migration is to
migrate layouts into the new preference.
The migration must also be called from the SettingsActivity as it might
use a different preference store due to the boot-aware preference copy.
2023-08-16 12:21:40 +02:00
Jules Aguillon
613aa283bd
LayoutsPreference: Remove cross button for custom layouts
...
Remove the cross button on the right of custom layouts to reduce
accidental removal.
A remove button is added in the dialog for modifying the layout.
2023-08-16 12:21:38 +02:00
Jules Aguillon
ddceb69d4e
LayoutsPreference: Modify custom layout
...
Clicking on a custom layout opens a dialog for modifying the layout
description instead of the dialog for selecting a layout.
2023-08-16 12:21:25 +02:00
Jules Aguillon
febc23776f
ListGroupPreference: Fix change items
...
[Preference.onClick] is apparently not called on [Item]s, though it is
on [AddButton].
Workaround this by listening on click events on the view.
2023-08-16 12:21:25 +02:00
Jules Aguillon
03f2b8df70
ListGroupPreference.Serializer: Allow exceptions
...
(De)serializing might raise exceptions, which are handled by dropping
the failing item.
2023-08-16 12:20:40 +02:00
Jules Aguillon
0269cd65ea
ListGroupPreference: Make items abstract
...
Allow items to be of any class instead of strings.
Item serialization and deserialization methods are in a separate class
because they are also used in a static context.
2023-08-16 12:20:40 +02:00
Jules Aguillon
9bd8b08544
ListGroupPreference: Allow to modify items
2023-07-30 23:34:48 +02:00
Jules Aguillon
818aa4c7d5
ListGroupPreference: Allow hide the "remove" button
2023-07-30 21:34:01 +02:00
Jules Aguillon
b4a1ac48bb
ListGroupPreference: Overrideable "add" button
2023-07-30 21:34:01 +02:00
Jules Aguillon
0856fb4e31
Refactor: Split out ListGroupPreference
...
Split out the implementation of a string-list preference from
CustomExtraKeysPreference.
Allows to share the implementation with future preferences.
2023-07-29 18:42:36 +02:00