-
Notifications
You must be signed in to change notification settings - Fork 94
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
hold to dismiss, fixes #20 #26
base: master
Are you sure you want to change the base?
Conversation
Updated so if you release early, the alarm icon is replaced with the text "HOLD". I think this is now good enough to merge, although I'd still prefer a countdown, if you know how to fix the issue with numbers not appearing. I'm also not sure how that issue will affect translations. |
(I also reduced the length from 3 to 2.5 seconds, because that feels like the right amount of time based on my experience in the last 2 weeks) |
With another few weeks of use:
|
13f3a66
to
e7f2451
Compare
Squashed my commits and changed to a slightly different approach of indicating that you need to hold. Uses an icon instead of the text, to avoid translation issues (only 4-5 letters would fit, and there was the lowercase issue). The details are in the commit message. Also reduced the duration again, to 2 seconds. I now have no more niggles at all about this and it's 100% merge-able. |
Instead of dismissing instantly on touch, instead the touch must be held down for 2 seconds. During this time, the background will fade to be the same color as the alarm icon, giving a progress indicator. While holding, the icon will also change to a finger (touch_app), to provide a hint about what you need to do. This is an effective hint because tapping makes it flicker, and if you hold for long enough to see what the new icon is, you'll also hold for long enough that the background will start fading, giving you the next hint. Pressing the home or back button will still dismiss instantly, since there's no way to track touches on those.
0e40ffb
to
b28a85c
Compare
(apologies for a couple force pushes in a row, there was an import I thought I could remove but didn't check, so then had to re-add it) |
I built an APK including this fix and some more config options :) |
Scratching my own longstanding itch in #20
The current implementation is:
After 3 seconds of pressing down on the screen, the alarm is dismissed. During those 3 seconds, the background fades from the default to the accent color (same as the alarm icon). If you release early, it will return to the original color. This all works pretty well and is intuitive.Described in the commit message, very similar to that^.
So, why is this PR still a work in progress? Well, currently it is not well-communicated that you need to hold down in order to dismiss the alarm. Once you start holding, it's obvious how long you need to hold (until the alarm icon disappears), but just tapping doesn't give any indication that you need to do more.The easy way out is just showing a toast. But I feel like there's probably a better way. I tried changing the alarm icon to a number counting down, but for some reason numbers (and lowercase letters) don't render at all (try replacing"\ue857"
with"3"
or"s"
, or"S3"
for full weirdness demonstration).No longer relevant since I'm using an icon.
This is also why I haven't changed the instant-dismiss from hitting the back button or otherwise leaving the app; those are also useful escape valves. (On second thought, given that, maybe this PR is mergeable).