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*.
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).
- Uses an ID that is accessible to applications: android.R.id.message.
The latter is definitely an implementation detail, but you could take
advantage of that by subclassing ProgressDialog, overriding onCreate,
getting the text view reference, and changing the color or background.
Not sure if that'll work on Honecomb.
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.
-- Kostya
01.03.2011 4:35, William Ferguson пишет:
Just so we'e clear, you tried using *
style="@android:style/Widget.ProgressBar"*, as was shown in that
stackoverflow post? You posted samples show AlertDialog and plaing Dialog.
No sure if it matters, but worth a shot if you didn't try it already.
I'm pretty certain I covered *exactly* that in one of the many
hundreds of scenarios I ran over the weekend.
But I'll go back and give it one more shot.
This is not something I've had to do, but a custom layout and setting it
with setView() on the dialog seems like the simplest alternative.
This is where I'm at too.
It just doesn't feel right to ditch exactly the layout I want and
replace it with the same layout but with a different style. All
because I can't seem to get my style applied correctly.
Thanks.
--
Kostya Vasilyev -- http://kmansoft.wordpress.com
--
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