Android: How to Change ProgressDialog's Text Color? [duplicate]
Asked Answered
B

1

13

Possible Duplicate:
Transparent, borderless ProgressDialog

I'm using Theme.Light in my app. While using Progress Dialog, text of dialog color is black and it's not encouraging.

I tried this change only dialog's text color, but didn't work:

<style name="Theme.MyDialog" parent="@android:style/Theme.Dialog">
    <item name="android:windowNoTitle">true</item>
    <item name="android:windowContentOverlay">@null</item>
    <item name="android:textColor">#FFFFFF</item>
</style>

Do I have to set the style (MyDialog) in any XML? Or how can I change dialog's text color?

Thanks in advance.

Basilio answered 9/5, 2012 at 22:21 Comment(0)
M
23

Apply your custom theme in ProgressDialog constructor:

ProgressDialog progressDialog = new ProgressDialog(this, R.style.Theme_MyDialog);

also change <item name="android:textColorSecondary">*my_text_color*</item> in this theme. In my case it's work on emulator and Acer LicuidE, but Samsung Galaxy Mini don't want to set my custom color for text((.

Miscreated answered 29/5, 2012 at 15:32 Comment(1)
I could only make it work using <item name="android:textColor">*my_text_color*</item>.Bozuwa

© 2022 - 2024 — McMap. All rights reserved.