I have an activity which is shown in a dialog:
In order to remove border and rounded corners, i tried this:
<resources> <style name="ActivityDialog" parent="@android:style/Theme.Dialog"> <item name="android:windowBackground">@null</item> <item name="android:windowFrame">@null</item> </style>
The border is gone, but sadly also the margin around the dialog.
Go to Design > Page Borders. In the Borders and Shading box, on the Page Border tab, select the arrow next to Apply to and choose the page (or pages) you want to remove the border from. Under Setting, select None, and then select OK.
You may call dismiss(); on the dialog.
Without creating a custom background drawable and adding a special style just add one line to your code:
dialog.getWindow().setBackgroundDrawableResource(android.R.color.transparent);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With