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

After shimmer is stopped I have my view still have shimmer_base_alpha setup #101

Closed ghost closed 3 years ago

ghost commented 4 years ago

When I set containter.setShimmering(false) my button is getting stuck with inactive shimmer on it, and it also becomes enabled = false. How to bring back origin color for my view and stop disabling it on stopShimmering?

JustusKlawischS2 commented 3 years ago

you can use app:shimmer_base_alpha="1.0" to make the shimmer overlay transparent. The default value of baseAlpha is 0.3, have a look at com.facebook.shimmer.ShimmerDrawable for all default values.

If this is not working for you, because the ShimmerDrawable is not accessible via ShimmerFrameLayout then use showShimmer(true) instead of startShimmer and hideShimmer instead of stopShimmer on the ShimmerFrameLayout.

xiphirx commented 3 years ago

start/stop apis will start/stop the animation only. show/hide apis will show/hide the shimmer + start/stop the animation.