Skip to content
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.

drawableLeft shimmer #70

Closed
ozanurkn opened this issue Oct 25, 2018 · 4 comments
Closed

drawableLeft shimmer #70

ozanurkn opened this issue Oct 25, 2018 · 4 comments

Comments

@ozanurkn
Copy link

How can i set only drawableLeft icon?

@xiphirx
Copy link
Contributor

xiphirx commented Oct 26, 2018

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

@ozanurkn
Copy link
Author

ozanurkn commented Oct 30, 2018

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
Copy link
Contributor

xiphirx commented Oct 30, 2018

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

@xiphirx xiphirx closed this as completed Oct 30, 2018
@ozanurkn
Copy link
Author

ozanurkn commented Nov 2, 2018

Thanks you bro

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants