Building the current alert dialog style is pretty complicated, involving putting together a variety of UI-specific resources as pieces in the ways that the current (and often changing) UI spec defines. So the resources used to construct the alert dialog are very much implementation details, not something to expose in the SDK.
For a long time I have wanted to create an AlertActivity class, which would give you the AlertDialog API within an activity. (In fact there is some refactoring of the code done a year or so ago to enable this.) So far I haven't had a chance, though. In the meantime as others have said what apps usually do is make their activity translucent and create the alert dialog inside of it. On Thu, Feb 17, 2011 at 7:01 AM, Kostya Vasilyev <[email protected]> wrote: > Jake, > > Ah, you mean like an *alert* dialog. I don't think you can. > > AlertDialog uses certain resources which are not accessible to > applications. You can find them under android-X\data\res\drawable: > > - popup_top_dark.9.png for the title bar background; > - popup_center_bright.9.png for the middle portion; > - ic_dialog_menu_generic.png for the title bar icon. > > ... but they can not be used by applications for some reason. > > It's possible to copy them into your project, but then some devices do > customize those images (like the Galaxy S family). > > If you really want that look, use an AlertDialog with a custom view if you > can. > > -- Kostya > > 17.02.2011 17:43, Jake Colman пишет: > > "KV" == Kostya Vasilyev<[email protected]> writes: >>>>>>> >>>>>> KV> 17.02.2011 16:35, Jake Colman пишет: >> >> <style name="DialogTheme" parent="android:style/Theme.Dialog"> >> >> KV> For one, you are missing the @ sign: >> >> KV> parent="@android:style/Theme.Dialog" >> >> >> Thanks for the catch but that wasn't the problem! >> >> Use the "Add to Home Screen" dialog as an example, how do I theme my >> activity to have that same look? Simply using Theme.Dialog as the >> parent style doesn't seem to be the whole solution. >> >> > > -- > 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 > -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- 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

