Skip to content

Reduce CPU usage when view isn't visible #212

Description

@anastr

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions