I have been trying to set a custom AlertDialog but was not able to get correctly.
prompt.xml
Try this
Dialog dialog = new Dialog(MainAppActivity.this, R.style.PauseDialog);
dialog.setContentView(R.layout.prompt);
dialog.setCancelable(true);
dialog.show();
and in style.xml
<style name="PauseDialog" parent="@android:style/Theme.Translucent.NoTitleBar"></style>
Dialog d=new Dialog(this);
//Add this
d.requestWindowFeature(Window.FEATURE_NO_TITLE);
d.setContentView(R.layout.prompt);
WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
lp.width = WindowManager.LayoutParams.WRAP_CONTENT;
lp.height = WindowManager.LayoutParams.WRAP_CONTENT;
d.getWindow().setAttributes(lp);
d.show();