I created my own (custom) dialog but want to style it as the original. To wit. On the bottom with dark background and brown button background. Is there any ready-to-use XML for this? (Therefore, I do not care about exact colors, heights, font size, etc.)
< Strong> This answer is incorrect
Use Theme.Dialog.Alert
to:
& Lt; ! - The default theme for the warning dialog window, which is used by {@link android.app.AlertDialog} class. This is basically a dialogue, but sets the background to clear, so it can do two-tone backgrounds. - & gt; & Lt; Style name = "theme dialog.artart" original = "@ Android: style / theme dialog" & gt; & Lt; Item name = "windowBackground" & gt; @Android: Color / Transparent & lt; / Item & gt; & Lt; Item name = "WindyTestestyle" & gt; @Android: Style / Dialog WindowTitle & lt; / Item & gt; & Lt; Item name = "windowIs floating" & gt; True & lt; / Item & gt; & Lt; Item name = "WindOntent Overlay" & gt; @ Null & lt; / Item & gt; & Lt; / Style & gt; This can then be applied to an XML layout or Android manifest, such as:
Or on any activity using. However, this does not seem to be a recommended practice, the simple sample code shown in it.
Comments
Post a Comment