I started porting my app into lollipop. I was able to theme the whole app to a particular color I like but I can't change the color of the ProgressDialog which is always green. Is there any way to do this?
Asked
Active
Viewed 2,010 times
5
-
You will need to set up colorAccent in an alert dialog theme. See http://stackoverflow.com/questions/26608390/android-v21-theme-appcompat-color-accent-is-ignored-no-padding-on-dialogs. – alanv Nov 21 '14 at 19:12
1 Answers
0
You have to find the asset and change its color with photoshop, or create a new asset and use that as progress dialog.
The new asset can be created like :
<?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 for example 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 have only to change the start and end color to make it how you want it

Elgert
- 470
- 2
- 5
- 19
-
What I am dealing with is not a progress bar, it's a standard ProgressDialog. – Nidhin Rejoice Nov 21 '14 at 15:57