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

drawableLeft shimmer #70

Closed ozanurkn closed 5 years ago

ozanurkn commented 5 years ago

How can i set only drawableLeft icon?

xiphirx commented 5 years ago

Not sure what you're asking, but you can always use ShimmerDrawable to set any sort of drawable.

ozanurkn commented 5 years ago

sorry for my bad english , i was asking i am using android:drawableLeft ="@drawable/ic_star_yellow_24dp" and i want to use shimmer library without text.. my code example below ;

<TextView
                                android:id="@+id/txt_check_opportunity"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:layout_centerVertical="true"
                                android:layout_marginLeft="0dp"
                                android:layout_toRightOf="@+id/checkbox_opportunity"
                                android:drawableLeft="@drawable/ic_star_yellow_24dp"
                                android:text="@string/opportunity"
                                android:textSize="@dimen/text_medium_size"
                                android:textStyle="bold" />
xiphirx commented 5 years ago

You cant set it directly from XML. You will need to use setCompoundDrawables in Java with a ShimmerDrawable

ozanurkn commented 5 years ago

Thanks you bro