question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android: Determinate circles disappear after screen display turned off until next update

See original GitHub issue

On Android, when the screen display is turned off, any determinate circles disappear until they are next updated. For determinate circles that are static and never updated, this means they permanently disappear after the screen display is toggled.

See the gif below of the Example app for a visual, with the update timeouts slowed down a bit. Note that the circles disappear until the next timeout update; at the end, after the periodic updates are complete, the circles are permanently gone.

out

Tested on Android 7.1.1 Nexus 5X simulator, and also seen in external use on Samsung Galaxy S7 and Samsung Galaxy S7 Edge devices running Android 7+.

Any ideas on potential fixes? A hacky solution for now for external apps might be to listen for React Native AppState updates and force re-rendering of these circles when the app becomes foreground/screen is turned back on, but obviously this is sub-optimal.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:6
  • Comments:10

github_iconTop GitHub Comments

1reaction
yaoguangdongcommented, May 10, 2018

this code fix it(base on @Gringox ‘s comment):

handleAppStateChange = appState => { if (appState === ‘active’) { this.setState({ progress:this.state.progress + 0.0001 }); } };

0reactions
mo-patelcommented, May 4, 2019

None of the above recommendations worked for me. Upon further research, this seems to be an issue with the React Native ART library as you can see here https://github.com/facebook/react-native/issues/17565

I ended up fixing this by manually applying the changes from this commit https://github.com/lekamj/react-native-circular-progress/commit/60fc3bcba8f07fffa866f730dddedd5f2da554d8 to the Circle.js file of this library. However, this workaround is not nice at all and I would recommend waiting for the RN team to come out with a more efficient fix

Read more comments on GitHub >

github_iconTop Results From Across the Web

Slow rendering - Android Developers
If your app suffers from slow UI rendering, then the system is forced to skip frames and the user will perceive stuttering in...
Read more >
Android ProgressBar disappears - Stack Overflow
It starts off displaying fine, but after I set the visibility of its parent ( overlayLayout ) to either gone or invisible and...
Read more >
24 hidden Android settings you should know about
Return to the Home Settings screen discussed in the previous tip. Here, you can choose whether or not the home screens rotate with...
Read more >
Progress indicators - Status - Human Interface Guidelines
When possible, switch a progress bar from indeterminate to determinate. ... in a table view, without waiting for the next automatic content update...
Read more >
Android 12: How to Change Lock Screen Clock - Nerds Chalk
When Android 12 was released, there was no official way to change the huge clock layout on a Pixel. Thanks to growing negative...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found