I have an activity which is shown in a dialog:
In order to remove border and rounded corners, i tr
The border, round corners and margin are all defined by android:windowBackground
. (Parameter android:windowFrame
is already set to @null
in Theme.Dialog
style, therefore setting it to @null
again has no effect.)
In order to remove the border and round corners you have to change the android:windowBackground
appropriately. The Theme.Dialog
style sets it to @android:drawable/panel_background
. Which is a 9-patch drawable that looks like this (this one is the hdpi version):
As you can see the 9-patch png defines the margin, border and round corners of the dialog theme. To remove the border and round corners you have to create an appropriate drawable. If you want to keep the shadow gradient you have to create set of new 9-patch drawables (one drawable for each dpi). If you don't need the shadow gradient you can create a shape drawable.
The required style is then: