trikita / talalarmo

Android alarm clock
http://trikita.co/talalarmo
MIT License
235 stars 95 forks source link

hold to dismiss, fixes #20 #26

Open smichel17 opened 4 years ago

smichel17 commented 4 years ago

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).

smichel17 commented 4 years ago

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.

smichel17 commented 4 years ago

(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)

smichel17 commented 4 years ago

With another few weeks of use:

smichel17 commented 4 years ago

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.

smichel17 commented 4 years ago

(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)

xeruf commented 4 years ago

I built an APK including this fix and some more config options :) https://github.com/xerus2000/talalarmo/releases/tag/4.0