Add quick-select chips to sleep timer#8049
Conversation
FineFindus
left a comment
There was a problem hiding this comment.
Thanks for the PR. Instead of defining each chip manually in the layout file, please create them programmatically, to avoid duplication and drift between the actual duration value and the displayed values.
See
For consistency reasons, the chips should also be displayed above the text field, similar to how the quick selection for speed values is displayed above the slider.
|
@FineFindus thanks for taking the time to review! |
To avoid the SleepTimer chips being cut of by the container margin, we use padding instead and set `android:clipToPadding` to `false`.
90f6d9b to
f21b751
Compare
FineFindus
left a comment
There was a problem hiding this comment.
Thanks! I changed it so the timer is started immediately when the user selects a chip and avoid the clipping of the chip bar to the container margin.
Added preset duration chips (10, 20, 30, 45, 60 minutes) to the sleep timer bottom sheet.
As a user, I want to quickly pick a duration without typing it in manually every time. Now you can just tap a chip to instantly set a common duration, making the sleep timer much faster to use for typical scenarios while still keeping manual input available for custom durations.