Improve custom server sync dialogs#20619
Conversation
|
Important Maintainers: This PR contains Strings changes
|
|
Thanks, but the text fields shouldn't be rounded. |
0f8b280 to
3e673c2
Compare
Corner radius removed and screenshots updated. I'd carried them over from |
3e673c2 to
9746532
Compare
|
A couple of comments for whenever you get a chance to review this:
|
|
Please revert the AnkiDroid Directory changes, this screen will be improved in |
9746532 to
3c1d5c4
Compare
|
@david-allison Done: removed the AnkiDroid Directory changes and updated the PR description accordingly. |
| // Use a custom MaterialTextView to match the title text appearance and padding, | ||
| // as seen in other dialogs (e.g. "Create deck"). The default TextView renders | ||
| // the title too small and inconsistent with Material dialog standards. |
There was a problem hiding this comment.
I'm not sure why we aren't using the default style of Material dialogs.
Is the name size issue related to the string size?
There was a problem hiding this comment.
Is the name size issue related to the string size?
Yes, with default styles, beyond a certain length, the title gets shrunk:
So I enforced custom styles like here. If it gets too long, the title wraps to a newline:
There was a problem hiding this comment.
I'd go with whatever Material does
There was a problem hiding this comment.
Done: removed the custom styles and updated the PR description accordingly.
3c1d5c4 to
41bc157
Compare
41bc157 to
b2ef5fd
Compare
|
Maintainers: Please Sync Translations to produce a commit with only the automated changes from this PR. Read more about updating strings on the wiki, |
Purpose / Description
In this PR, I updated the "Sync URL" and "Custom root certificate"
, and "AnkiDroid directory"[scope update 1] dialogs to:most notably, make their titles the same size[scope update 2].Additionally, I capitalized "url" in "Sync URL".
Fixes
Approach
To enforce consistency across dialogs, I identified the shared classes: "Sync URL" and "Custom root certificate" use
VersatileTextPreference/VersatileTextPreferenceDialogFragment; I updated "AnkiDroid directory" to use it too.Then, I wired a
dialogHintattribute, and I made shared layout display the hint and have a "Save" button. The dialog styling update follows the same approach as the already-merged #20520.How Has This Been Tested?
I did some manual tests across the two dialogs on my physical device:
I ran the following commands:
Learning
Lessons learned:
findViewById(ref) and use extensions (ref) when possible.Checklist