Skip to content
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

Reduce CPU usage when view isn't visible #212

Open
anastr opened this issue Jul 16, 2021 · 0 comments
Open

Reduce CPU usage when view isn't visible #212

anastr opened this issue Jul 16, 2021 · 0 comments

Comments

@anastr
Copy link
Owner

anastr commented Jul 16, 2021

Describe the issue
On Android 6.0 (API 23) and lower, the animator object keeps running in the background even when the view goes invisible to the user (like open second activity). This isn't the case with Android 7.0 (API 24) or higher, because we cancel animation when the view becomes invisible inside onVisibilityAggregated method.

Additional context
This isn't a big problem since Android OS wont draw view frames if that view isn't visible to the user. But it's not nice to keep an unnecessary thread running and consuming the system resources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant