-
-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Settings upgrade #1325
Merged
Merged
Settings upgrade #1325
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ion function paramter
and hide debug settings from search
This part is mostly done now, color and language settings will be done separately. |
Old settings still exist for comparison, will be removed later. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A big step towards #1109, and fixes #507 with the search field
This PR is a complete re-write of the settings in compose.
The current Settings based on Android(x) preferences are very unflexible when it comes to tuning the screens, and it's very easy to get into a mess with weird sizes, paddings and whatever. Compose allows for more flexibility and does not require splitting everything in multiple parts (style and pref screen in xml, pref fragment in code).
Compose also has some drawbacks:
Currently there are only 2 simple settings screens rewritten, but the rest is coming soon.
A core part of this PR is the central part containing all settings (working name
AllPrefs
). Here each preference can be added in a much more contained way than previously.The preference screens simply get the individual prefereces from there by the settings key, and only need little additional code such as when to hide specific elements.
A search field (icon in top bar) allows filtering
AllPrefs
by title and description / summary. The field also allows testing the keyboard everywhere.The preferences are recomposed on settings changes, so there is no need to keep track of changes in the current screen.
In the current state the old settings are accessible too, for easier comparison and also because not all screens are re-done.
The "only" thing missing is implementing the remaining screens, but that's quite a bit of work considering some specialized element like the SeekBarDialogPreference, the reorderDialog, or the whole language settings.