Sunday, February 27, 2011

[android-developers] ProgressDialog Theme - TextColor or Background but not both

I'm tryig to style my ProgressDialogs to have a certain background and
a certain TextColor.

I can set the background of the ProgressDialog content pane (but not
the TextColor) if I define an alterDialogStyle in my main application
theme and invoke the ProgressDIalog using the single arg constructor.

<style name="ApplicationTheme" parent="android:style/Theme">
<item name="android:alertDialogStyle">@style/AlertDialogStyle</
item>
</style>

<style name="AlertDialogStyle" parent="@android:style/
AlertDialog">
<item name="android:fullDark">@drawable/dialog_background</
item>
<!--item name="android:textColor">@color/jumblee_yellow</item--
> <!-- No impact. -->
<item name="android:textAppearance">@style/
AlterDialogTextAppearance</item> <!-- No impact. -->
</style>


And I can get the TextColor, but not the background of the
ProgressDialog to display if I instead use the 2 arg constructor of
ProgressDialog and pass in a ProgressDialogTheme.

<style name="ProgressDialogTheme" parent="android:style/
Theme.Dialog">
<item name="android:textColor">@color/jumblee_yellow</item>
<!-- Colours the ProgressDialog text. -->
<item name="android:windowBackground">@color/transparent</
item> <!-- Hides the title and just displays the content panel (as
long as background does not have a value) -->
<!--item name="android:panelBackground">@color/jumblee_purple</
item--> <!-- no impact -->
<item name="android:background">@color/jumblee_purple</item>
<!-- no impact -->
</style>


Any ideas on how using either of these methods I can get both the
TextColor and the Background to display as I want them to?

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment