felixwiemuth / SimpleReminder

Efficient creation of simple reminders on Android.
Other
54 stars 8 forks source link

Enabling "Close keyboard when using clock" option makes the time picker unresponsive to touch (Android 5.1.1) #49

Open a-pav opened 2 months ago

a-pav commented 2 months ago

Enabling "Close keyboard when using clock" option works only partially. That is, after enabling this option, when the time picker is touched, keyboard gets closed, but then the time picker has also became unresponsive to touch (unable to change time by finger movements.)

I couldn't find a way to change the time while the option is enabled. It seems that merely enabling the option causes this issue since I tried closing the keyboard by pressing the system's back button (and not by touching the time picker) but still the time picker wasn't responding to my touch after the keyboard was closed.

Please add the following information:

Initially mentioned in #48.

felixwiemuth commented 2 months ago

Thanks for the report and additional information. I guess it has something to do with your system not responing as expected to the request of closing the keyboard (e.g. by blocking), which is triggered when touching the time picker (regardless of whether you have already closed the keyboard or not).

It doesn't happen on some physical devices and some emulated devices which I tested with.

If you are interested or want to figure it our yourself, here is the code which is executed on touch: https://github.com/felixwiemuth/SimpleReminder/blob/f498e1fcedab155145526ece5d27bdbb8502655c/app/src/main/java/felixwiemuth/simplereminder/ui/ReminderDialogActivity.kt#L16

You could see whether it helps only triggering the action once instead of on every touch. But to include that in the solution would be a bit more complicated, as you want it to work several times in a row of course. A "cooldown" based on timestamp coule be a simple solution for that. However, I would rather only build it in if it turns out to be a general problem.

a-pav commented 2 months ago

However, I would rather only build it in if it turns out to be a general problem.

Personally I prefer hiding my keyboard manually, so I don't use this option myself. I don't remember enabling the similar options in other apps either, for example I haven't enabled Telegram's Hide keyboard on chat scroll.

Thanks for pointing out what's likely causing the issue. I'm considering learning Android development, so I might actually have a look at it at sometime.