-
Notifications
You must be signed in to change notification settings - Fork 16
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
change progress ring color with array of color #23
Comments
From what I've seen this is not implemented. How would you show 3 colors in a progress? |
Aha, it seems some kind of gradient color. Let's wait for @kuassivi reply. |
Hi, thanks @ksandyasa. |
Added new feature for gradient progress ring #23
Create an array of colors as a resource value. <resources>
<array name="gradient">
<item>@color/white</item>
<item>@color/black</item>
</array>
</resources> Then apply it with some few configs in the ProgressProfileView as follow: <com.kuassivi.view.ProgressProfileView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="centerCrop"
android:adjustViewBounds="true"
tools:src="@drawable/ic_icon_user_default"
app:progress="65"
app:progressRingCorner="ROUND"
app:progressRingSize="10dp"
app:progressRingOutline="true"
app:progressGradient="@array/gradient" <---
app:backgroundRingColor="@android:color/darker_gray"
app:joinGradient="true" <---
app:gradientFactor="5.0"/> <--- Gradient ring cannot be shown in Preview for now. |
I wish the feature of gradient ring color can be implemented as soon as possible.. |
i want to ask how to set progress ring color from array of colors? I want to show progress ring color with 3 different type colors. How i do that? |
@abhinavkorpal hi, as per you question, if want to set multiple color to progress ring than you need to set color array as integer as Gradient but is this lib, setProgressGredient is not working. |
@abhinavkorpal , Add this method in ProgressProfileView.java cass in Lib, public void setProgressGredientColor(int[] mProgressGradient) {
use this method you can set gradient color to progressview. |
@viswakarmalovekush amazing it's working. Thanks |
Welcome dude 👍 |
Hello,
I'm using your library into my project apps and it's really awesome library. So i want to ask how to set progress ring color from array of colors? I want to show progress ring color with 3 different type colors. How i do that?
The text was updated successfully, but these errors were encountered: