Change AlertDialog Style

When I run this code, a warning dialog is displayed, but there is one white border around the dialog and the borders are a little rounded. I do not want this white border, and I want to have real angles with an angle of 90. I hope you understand what I'm trying to do.

        AlertDialog.Builder ad = new AlertDialog.Builder(this);
        Button bbb=new Button(MvcnContactList.this);
        ad.setView(bbb);
        alertDialog = ad.create();
        alertDialog.show();

enter image description here

Is there a way to erase the alert dialog, but not the color of the text or the size of the text or something like that ... I want the border style of the alert dialog, so setting only the theme is probably the solution to this problem. But I do not know what properties to override.

Thank,

EDIT: For example, this style overrides textColor to 00FF00, and this is cool, but what property should I redefine so that the corners do not round and remove this white scooter

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="AlertDialogCustom" parent="@android:style/AlertDialog">
        <item name="android:textColor">#00FF00</item>
        <item name="android:typeface">monospace</item>
        <item name="android:textSize">10sp</item>
    </style>
</resources>
+5
2

, () - . R.style.MyTheme alert, .

ContextThemeWrapper ctw = new ContextThemeWrapper( this, R.style.MyTheme );
        AlertDialog.Builder builder= new AlertDialog.Builder( ctw );
+15

, , , , :

<style name="PauseDialog" parent="@android:style/Theme.Dialog">
        <item name="android:windowNoTitle">true</item>
        <item name="android:windowBackground">@android:color/transparent</item>

</style>

res\values ​​\ styles.xml . :

android:theme="@style/PauseDialog" 
+1

All Articles