niccokunzmann / mundraub-android

đŸ“±Android App for Mundraub, Na-Ovoce and other fruit maps
https://f-droid.org/en/packages/eu.quelltext.mundraub/
GNU General Public License v3.0
33 stars 22 forks source link

Confusing loading state in Battery Saver #329

Open graciouselectric opened 6 months ago

graciouselectric commented 6 months ago

Dear developer,

I noticed that when I enable Battery Saver on Android 8.1, the indeterminate ProgressBars in the app are not properly shown. This is a known problem in Android API level <28, see e.g. this StackOverflow question. Battery Saver disables animations, also on progress bars on these versions. This is quite confusing because the loading state is not properly represented. It is fixed in later Android versions, where progress bars do appear and animate.

Looking at the code, indeterminate progress bars are created here:

className='eu.quelltext.mundraub.activities.AddressSearchActivity', lineNumber=77)
className='eu.quelltext.mundraub.activities.StartupActivity', lineNumber=35

To fix this issue, one can check ValueAnimator.areAnimatorsEnabled() and provide a different UI element, such as a text label, when animations are disabled.

I also recorded a video, showing the issue in practice:

https://github.com/niccokunzmann/mundraub-android/assets/165037835/425ca3cf-f3f4-427c-b718-d7bbb47ffc35


We're using Polar.sh so you can upvote and help fund this issue. We receive the funding once the issue is completed & confirmed by you. Thank you in advance for helping prioritize & fund our work.

Fund with Polar

niccokunzmann commented 6 months ago

Thank you very much for reporting this! I do not have time at the moment to work on it but you are very welcome to provide a pull request!