nextcloud / nextcloud/news-android

Confusing loading state in Battery Saver

Open
#1,423 1 comment 0 reactions 0 assignees View on GitHub
enhancement good first issue
Dominant language
Java
Stars
764
Forks
262
Avg merge
1d 13h
Merged PRs (30d)
13

Description

Dear developer,

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](https://stackoverflow.com/questions/35221706/progressbar-disappears-in-battery-saver-mode-android-5-x). 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='de.luhmer.owncloudnewsreader.PodcastFragment', lineNumber=473
className='de.luhmer.owncloudnewsreader.adapter.NewsListRecyclerAdapter', lineNumber=229
```

To fix this issue, one can check [ValueAnimator.areAnimatorsEnabled()](https://developer.android.com/reference/android/animation/ValueAnimator) and provide a different UI element, such as a text label, when animations are disabled.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.