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

Support for passing default style by theme attribute #131

Open v-mas opened 2 years ago

v-mas commented 2 years ago

Please add support for using theme attribute to pass default style.

It could be done in Shimmer builder by accepting third parameter

   AlphaHighlightBuilder().consumeAttributes(context, null, R.attr.shimmerStyle).build()

Or for extending Layout class, like

    class MyLayout constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = R.attr.shimmerStyle) : ShimmerFrameLayout(context, attrs, defStyleAttr)