romainpiel / Shimmer-android

(DEPRECATED) An Android TextView with a shimmering effect
2k stars 438 forks source link

Added support for right-to-left shimmer #5

Closed mattlogan closed 10 years ago

mattlogan commented 10 years ago

Hey there!

Nice library. I just added another styleable attribute called shimmerDirection to let the user decide the direction of the shimmer movement. It works just like LinearLayout's "layoutDirection" attribute.

romainpiel commented 10 years ago

Hmm interesting but I'm not sure I want to set that at the view level. It's a property related to the animation and not to the view itself. Right now the ShimmerTextView has no idea it's animating.

I was planning to convert my Shimmer.animate() to a builder and add that kind of feature.

Thanks for the PR anyway. I'll see what I can do tomorrow.

romainpiel commented 10 years ago

linking that to #4

mattlogan commented 10 years ago

It makes sense that it's a property of the animation, not the view. In MainActivity you would then have something like Shimmer.animate().rightToLeft(), or Shimmer.animate().direction("rtl").

I just thought it would be easy for the user to define the shimmer direction in the same place they set the text and color (in the xml), but your explanation makes more sense from a design standpoint.

romainpiel commented 10 years ago

fixed in version 1.1.0