-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[BUG] Confusing loading state in Battery Saver #4400
Comments
Thanks for the report. This could be interesting for some community contribution. Anyway, mind that this is an issue that only happen in old versions (Android 8 dated 2017) and with battery save mode, so, not many users will suffer this. |
Hi @graciouselectric! Thanks for opening a new issue! 🍻 I can see the code lines you refer to are not pointing to progress bars in the current code in In any case, as @jesmrec said, contributions are always welcome 😄. You seem to have some idea of the code, if you feel like, I encourage you to send your own PR and we'll review it 🚀. |
I would like to contribute to resolving this issue. |
go ahead @lakshay6907 |
I would like to know the server, login, and password to check the app. Could you please provide me with this information? |
@lakshay6907 you can use the public server: |
Is this issue still open? |
Yes, it is. |
Hi @lakshay6907! It is open, but we need to clarify its scope before developing any solution. As commented above, the spinning wheel shown in the video is not a progress bar, so the video and the description of the issue are not aligned. Once we define exactly what we want to do here, we can go for a PR 👍 |
Hello @JuancaG05 , thank you for your reply. I am currently reviewing the entire login page activity and noticed that an in-built resource is defined in the TextView within the XML file. Additionally, multiple functions that reuse this TextView element also attempt to override the vector resource. This repeated definition of a single vector resource might be causing the issue. If you need any further information or assistance, please feel free to contact me. I find this project very interesting and am eager to contribute. XML file:- account_setup.xml Thank you. |
Hi @lakshay6907! Glad to hear that! We'll be happy to receive contributions from you 😄. Regarding the issue, yes, I see the |
Hi @JuancaG05, As I noticed the icon is modified frequently, I suggest using a vector image for the loading icon instead. This would ensure consistency in our loading icon and eliminate the need for repeated modifications. Additionally, this approach would free up space in the TextView for any other icon at the start. We can still utilize the existing PNG icon as needed. I could be wrong here, so I would recommend seeking the opinions of others as well. |
Hi @lakshay6907! Changing the PNG by its corresponding vector could be an improvement. But:
So I'd keep asking for different thoughts and approaches, since the scope of the issue and the problem is not clear as I said |
What I think is that the problem revolves around the fact that while the battery saver is on, the animations in the project must be eliminated, but in the application, animations are still working. |
Actual behaviour
Progress bar appears and animates
Expected behaviour
Nothing or non-animating circle is shown
Steps to reproduce
Can this problem be reproduced with the official owncloud server?
(url: https://demo.owncloud.org, user: test, password: test)
Yes
Environment data
Android version: 8.1
Device model: Pixel 7 Emulator
Stock or customized system: Stock
ownCloud app version: 4.2.1
ownCloud server version: -
Additional info
I noticed that when I enable Battery Saver on Android 8.1, the indeterminate
ProgressBar
s 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:
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 bug in practice:
com.owncloud.com.mov
The text was updated successfully, but these errors were encountered: