facebookarchive / shimmer-android

An easy, flexible way to add a shimmering effect to any view in an Android app.
http://facebook.github.io/shimmer-android/
Other
5.31k stars 698 forks source link

Animation status when set visibility to GONE #141

Closed MoustafaElsaghier closed 1 year ago

MoustafaElsaghier commented 1 year ago

I'd like to know what will happen on the memory side in the case of a developer called shimmerLayout.isVisible = false without calling stopShimmer()

will ShimmerLayout handle stop on its own OR animation will keep running and consuming memory and must call stopShimmer()?

I've checked the code but, I couldn't find anywhere mValueAnimator.cancel() out of bounds stopShimmer() and setShimmer()

so, please can someone assist with that question, please?

emresarincioglu commented 1 year ago

It calls stopShimmer() when visibility set to gone or invisible. See onVisibilityChanged

MoustafaElsaghier commented 1 year ago

thank you, noted