When I run this code the alert dialog is shown but there is one white border around the dialog and also the borders are little round. I do not want this white border and I w
I found solution with the wrapper, where you can set a theme (style) to anything in the current context. I set R.style.MyTheme as style to my alert dialog and I customized that view to my own taste.
ContextThemeWrapper ctw = new ContextThemeWrapper( this, R.style.MyTheme );
AlertDialog.Builder builder= new AlertDialog.Builder( ctw );
You answered your question yourself but it did not work for me, so here's my answer hope to be helpful for everyone who need it:
<style name="PauseDialog" parent="@android:style/Theme.Dialog">
<item name="android:windowNoTitle">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
</style>
Put this style in res\values\styles.xml file and just set the theme of your activity to it in your Manifest. Like this:
android:theme="@style/PauseDialog"