SpeedView icon indicating copy to clipboard operation
SpeedView copied to clipboard

Reduce CPU usage when view isn't visible

Open anastr opened this issue 3 years ago • 0 comments

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.

anastr avatar Jul 16 '21 13:07 anastr