I am trying to add a customized ProgressDialog
to my Activity
. I successfully changed the ProgressDialog
font and the background colors, but I don't know how to change the spinner color without using a widget. Can anyone help me?
This is my Activity
code:
myPd_bar=new ProgressDialog(Ratings.this,R.style.Theme_MyDialog);
myPd_bar.setMessage("Loading....");
myPd_bar.setTitle(null);
myPd_bar.show();
This is my styles.xml
code:
<style name="Theme.MyDialog" parent="@android:style/Theme.Dialog">
<item name="android:textColor">#daac56</item>
<item name="android:background">#160203</item>
<item name="android:windowFrame">@null</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowIsFloating">true</item>
<item name="android:windowContentOverlay">@null</item>
</style>
And this is the current output:
You would have to find the asset of the progressbar and change the color manually with Photoshop or some other image editing program.
If you really want to style your progressbar, I would recommend taking a look at the HoloEverywhere library, which gives your app the Android 4.0 Holo style, compatible with older versions of Android, it looks really nice.
By the way, the Android design guidelines say it's unnecessary to add the "Loading..." text next to the progress bar. The progressbar is enough to indicate the user that your app is loading. They also say it is nicer to embed the progressbar somewhere in your app, rather than displaying it in a dialog.
You can't... because the spinner is different on all android versions (2.3, 4.0, ...)
If you want to change the spinner,
Or
But why change the spinner ? Is it really important ?
It won't be easy to change the colour of the spinner.
If you wan't to have a different colour on the spinner the easiest will be to create your own progressdialog (extend it from the current). And then do a customized animation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With