sweakpl / qralarm-android

QRAlarm is an Android alarm clock application that lets the user turn off alarms by scanning the QR Code.
GNU General Public License v3.0
112 stars 10 forks source link

Time scrolling bugs out #28

Closed BloodRaven0 closed 11 months ago

BloodRaven0 commented 12 months ago

When scrolling the time, the numbers above the current time disappear, and when this happens, the alarm is set to the bottom numbers (1 hour and 1 minute forward of what they should be)

These fading numbers above and below might look fancy, but their implementation seems to be buggy. Could we get a rollback to the previous time selection menu until this is debugged?

Happens on both android 10 and android 13, different phones and vendors, from atleast version 1.5 (haven't tested earlier versions)

Screenshot_20230910-100602_QRAlarm

sweakpl commented 12 months ago

Could you please provide a video of this issue? I am not sure if this is a breaking bug.

The time picker is using a native Android time picker since the previous version of it was lacking the fling functionality and was really difficult to change.

Native time picker does support flinging so I've decided to stick with it. I've modified the style of it and I suppose that the bigger font that I've applied is responsible for this numbers disappearing.

I don't want to fall back to the previous implementation since the lack of flinging is far more problematic for the general user experience than this new problem unless it is somehow more troublesome than I think.

BloodRaven0 commented 12 months ago

@sweakpl Here is a video. The first alarm was set at the correct time (7:00) before scrolling, after scrolling the alarm was 1hr and 1 minute later than it should have been (8:01).

https://github.com/sweakpl/qralarm-android/assets/42444745/9c9f1b22-ee02-481b-a685-d765c387eba4

I do think this is more problematic than no-flinging, because it could lead to 1 hour oversleeping if the user is not aware of the bug.

sweakpl commented 11 months ago

I've been trying to reproduce this bug on various devices, but I really could not 😕 Is there anything in common in the devices you have tested on? Like phone manufacturer or Android custom ROM? Also, does the notification in the app bar show the wrong alarm time as well when this bug is happening?

BloodRaven0 commented 11 months ago

One phone is on Android 10, rooted with custom rom (resurrection remix) phone is Poco x3 nfc, the other is pretty much a stock Samsung android 13, galaxy a54.

The bug is in the UI, so when it sets the alarm for a wrong time, its reflected in the notification as well. My guess is that it's set to show 3 rows of numbers and set the alarm to the second row, so when the first disappears for whatever reason, it sets it to the one below?

I can try to install old versions to find which is the first one with the bug if that would help.

sweakpl commented 11 months ago

Thanks for information. There's no need to do anything on your side, thank you. This is an internal Android bug and probably belongs to the Google Issue Tracker as like I said, the time picker is a native Android time picker - not my own implementation. I will have to test this in separation as soon as I can.

sweakpl commented 11 months ago

I've investigated further and the bug was caused by too large font size of the time picker. I've decreased it and locked it so that user settings won't be able to increase its size. The change will be present in the future update.