Thanks Kostya,

On Mar 1, 7:58 pm, Kostya Vasilyev <[email protected]> wrote:
> There is a style for Progress *Bar*, in fact, a lot of variations on the
> progress bar (large / small, inverse or not, etc.)
>
> However, there is no style for progress *dialog*.

Isn't there a style for AlertDialogs though?
I thought that it would be possible to set AlertDialogStyle in my
application Theme to be able to control the Style of all the
AlertDialogs (of which ProgressDialog is one).

<style name="MyTheme" parent="@android:style/Theme.Light.NoTitleBar">
    <item name="android:alertDialogStyle">@style/AlertDialog</item>
</style>


> A quick inspection of progress_dialog.xml from the sources shows that
> the TextView with the message:
>
> - Does not use any specific style reference, so it can't be customized
> with a theme attribute (not without affecting how the parent activity
> looks, or possibly creating a ContextThemeWrapper just for this dialog).

Could you explain this a bit more, I didn't quite follow.
I understand that message TextView doesn't have any styling attribute.
But I thought that a Dialog could have its own Theme irrespective of
its parent Activity by either explicitly setting the Theme in the
Dialog constructor or by speciyfing 'android:alertDialogStyle' in the
application Theme.


I also had a look at the ContextThemeWrapper but I couldn't se how it
should be used to modify the stle for various View elements.
Can point me to an example showing how it would be used?


> Best option, in my opinion - create your own progress dialog so as to
> not rely on implementation details.
>
> Make sure it's based on AlertDialog so you get the pretty title bar with
> the icon and possible device-specific customizations. The most important
> piece, the progress wheel style, is accessible to SDK applications, so
> it should not give you any trouble.

Yes. I think either this or setting my own custom View in an
AlertDialog is the only solution.
Make my think that the styling of the dialogs is a bit of a train
wreck.

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

Reply via email to