Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing color of circle in programatically #160

Open
vijayakumarksv opened this issue Mar 31, 2022 · 2 comments
Open

Changing color of circle in programatically #160

vijayakumarksv opened this issue Mar 31, 2022 · 2 comments

Comments

@vijayakumarksv
Copy link

vijayakumarksv commented Mar 31, 2022

How to change circle indicator color for programmatically?

@CorzaHorizon
Copy link

CorzaHorizon commented Sep 1, 2022

try this:

val indicator: CircleIndicator3 = binding.indicator
indicator.tintIndicator(mContext.getColor(R.color.red))

or

drawable > indicator_dot.xml

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:padding="10dp"
    android:shape="oval">
    <solid android:color="@color/orange" />
    <corners
        android:radius="25dp" />
</shape>

layout file

<me.relex.circleindicator.CircleIndicator3
          android:id="@+id/indicator"
          android:layout_width="match_parent"
          android:layout_height="48dp"
          android:layout_marginBottom="10dp"
          android:layout_gravity="bottom"
          app:ci_drawable="@drawable/indicator_dot" />

@thomas-warrier
Copy link

@CorzaHorizon Thank you <3

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

No branches or pull requests

3 participants