I have created custom dialog that located in values/styles:
<style name="AppTheme" parent="android:Theme.Light" />
<style name="MyDialogTheme" parent="android:Theme.Dialog">
<item name="android:windowBackground">@null</item>
<item name="android:windowNoTitle">true</item>
</style>
And then I wish to use it:
final Dialog dialogC = new Dialog(context,R.style.MyDialogTheme);
dialogC.setContentView(R.layout.confirm);
I get no errors, but it still uses the default theme. This theme worked perfectly when I used it for an activity that I wished to appear as dialog.
use this one, it’s work for me