Lollipop Color Change - ProgressDialog

I started porting my application to candy. I was able to tag the entire application for a specific color that I like, but I cannot change the color of the ProgressDialog, which is always green. Is there any way to do this?

+5
source share
1 answer

You need to find the asset and change its color using Photoshop, or create a new asset and use it as a run dialog.

A new asset can be created as follows:

<?xml version="1.0" encoding="utf-8"?> <rotate xmlns:android="http://schemas.android.com/apk/res/android" android:pivotX="50%" android:pivotY="50%" android:fromDegrees="0" android:toDegrees="360"> <shape android:shape="ring" android:innerRadiusRatio="3" android:thicknessRatio="8" android:useLevel="false"> <size android:width="76dip" android:height="76dip" /> <gradient android:type="sweep" android:useLevel="false" android:startColor="#447a29" android:endColor="#447a29" android:angle="0" /> </shape> 

and call this progress.xml file, and then use it like this:

 <ProgressBar android:id="@+id/ProgressBar01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background ="@xml/progress"> 

and you only need to change the color of the beginning and the end to make it the way you want.

0
source

Source: https://habr.com/ru/post/1207416/


All Articles