ongakuer / CircleIndicator

A lightweight indicator like in nexus 5 launcher
Apache License 2.0
4.27k stars 714 forks source link

Is there a way to provide "ci_drawable" from the code? #138

Open mitab86 opened 4 years ago

mitab86 commented 4 years ago

I had been using the ci_drawable from the XML but recently I need to provide the ci_drawable from activity as I have used the save slider from multiple sections and need to provide different color.

nivanrajmohan commented 4 years ago

yes, you can, I have used mine with custom drawable xml

mitab86 commented 4 years ago

Can you share please?

Booen-Ren commented 4 years ago

<me.relex.circleindicator.CircleIndicator android:id="@+id/indicator" android:layout_width="100dp" android:layout_height="match_parent" android:layout_alignParentRight="true" app:ci_gravity="top|center_horizontal" app:ci_margin="10dp" app:ci_orientation="vertical" app:ci_drawable="@drawable/circle_shape" app:ci_drawable_unselected="@drawable/circle_shape" app:ci_animator="@anim/scale_with_alpha2" /> Like this code. I use my drawable to change defult drable. You just need create a new drable file.