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.32k stars 695 forks source link

How to exclude some views #39

Closed AlexisQapa closed 6 years ago

AlexisQapa commented 6 years ago

Hi,

Looking at the documentation I didn't found a way to exclude some views from the animation. Is there a way to achieve this without having multiple shimmers ?

Here is what I'd like to have with Separator and TextView not animated :

<ShimmerL>
<ConstraintL>
<View>
<View>
<Separator>
<TextView>
<View>
<View>
</ConstL>
</Shimmer>

The thing is with a complex layout it's nice to flatten it with constraint layout. Having (multiple) ShimmerLayout inside my constraint layout remove the ability to setup constraint within childs views.

xiphirx commented 6 years ago

Unfortunately not. We can't really know what to exclude when drawing the shimmer as its all done via shaders + porter duff xfer modes.