In a theme of your own override the android:alertDialogStyle style to point to the style you want. http://developer.android.com/reference/android/R.styleable.html#AlertDialog The link above contains the attributes that are stylable about an Alert Dialog.
To change the fonts you will have to override the usual android:textAppearance* attributes defined in a theme. Note: An Alert Dialog either builds it's background from 3 drawables (top, mid, bottom) or a singe drawable. For best results all your drawables should have identical left/right paddings defined, because there are alert dialogs that use a bright top and dark mid and dark bottom drawables for example. Just experiment around and you will get the hang of, there is no documentation about this, I had to look at the source code to figure out how it works. good luck. On Mar 16, 5:44 pm, dan raaka <[email protected]> wrote: > try using setTheme for the context in the AlertDialog.Builder(Context > context) > > -Dan > > On Mon, Mar 16, 2009 at 5:58 AM, Rafael Bocaletto Maiolla < > > [email protected]> wrote: > > > Hi, > > > Is there a way to change the Alert Dialog style, like background and > > font color using something like > > > <?xml version="1.0" encoding="utf-8"?> > > <resources> > > <style name="Theme" parent="android:Theme"> > > </style> > > <style name="Theme.Dialog"> > > <item name="android:colorBackground">#FF0000</item> > > <item name="android:colorForeground">#00FF00</item> > > </style> > > </resources> > > > in the styles.xml? > > > If so, what do I need for this to work? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

