fix(preferences): Improve UI of IncrementerNumberRangePreferenceCompat#20271
fix(preferences): Improve UI of IncrementerNumberRangePreferenceCompat#20271david-allison merged 1 commit intoankidroid:mainfrom
Conversation
|
I'll fix the alignment, but @ZornHadNoChoice just suggested removing the buttons entirely here: #20005 (comment) What should be done? |
|
Keep the buttons, this looks great to me aside from Brayan's comment |
david-allison
left a comment
There was a problem hiding this comment.
This is AWESOME, thank you!!
Could you post 3 variants of the "light" theme with a different, (IMO: darker, still blue) colour for the icon colour, and the original
That's the only one which I mildly feel we can do better on, the rest are perfect
AnkiDroid/src/main/java/com/ichi2/preferences/IncrementerNumberRangePreferenceCompat.kt
Outdated
Show resolved
Hide resolved
7a9c402 to
7a59534
Compare
david-allison
left a comment
There was a problem hiding this comment.
Mild preference for material_light_blue_700
Implementer's choice - let us know what you decide on and we'll merge
Thanks!!
| private var bindingRef: DialogIncrementerPreferenceBinding? = null | ||
| private val binding get() = bindingRef!! |
There was a problem hiding this comment.
Since the fragment lives longer than the view we need to make bindingRef = null in onDestroyView(), and lateinit variables cannot be set to null
There was a problem hiding this comment.
by viewBinding(DialogIncrementerPreferenceBinding::bind) won't work in this circumstance?
There was a problem hiding this comment.
I looked into it. Because we are creating the view from scratch in onCreateDialogView (inflating it manually to return binding.root), the ::bind method which expects an existing view won't work here it seems, so we have to handle the lifecycle manually
There was a problem hiding this comment.
Preferences are weird, cheers
7a59534 to
dc403ec
Compare
dc403ec to
953ebcf
Compare






Purpose / Description
Updates the UI of
IncrementerNumberRangePreferenceCompatto use Material Design components and fixes visibility issues across different themes.Fixes
IncrementerNumberRangePreferenceCompat#20005Approach
ButtonwithMaterialButton(Elevated button) andEditTextwithTextInputLayoutincrementerButtonBackground,incrementerInputBackground,incrementerIconColor) toattrs.xmland defined specific colors for light, plain, dark, and black themesHow Has This Been Tested?
WhatsApp.Video.2026-01-31.at.18.24.19.mp4
Enabled buttons:
Error text and disabled buttons:
Checklist
Please, go through these checks before submitting the PR.