I use the AlertDialog class in my application. By default, these alert dialogs have a transparent background. I\'m trying to use an opaque background instead, very unsuccess
It's easy to do this in an XML style once you figure that AlertDialogs have somewhat special attributes.
However, it would be interesting to know which Android version you're referring to (or are targeting at). Theme.Dialog is relatively new as far as I know. Newer Android versions also don't use AlertDialogs under all circumstances where older versions used them.
This works for me in Android 2.2:
Newer Android versions also have android:progressLayout and android:horizontalProgressLayout attributes for the AlertDialog style.
Also, in newer Android versions, it is possible to refer to an AlertDialog theme by using alertDialogTheme instead of alertDialogStyle in a custom theme. AlertDDialogThemes support more familiar and more powerful attributes like windowBackground, windowTitleStyle etc. Have a look at styles.xml and themes.xml.
Unfortunately, the documentation of which feature was added when is super poor. Please find out for yourself whcih approach is the best for you.