I\'m trying to make a custom dialog shape for my app\'s dialogs. I\'ve been searching for this topic for hours, but the solutions I find don\'t work for me, that\'s why I as
The key thing to remove default android frame is:
MyDialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
Here is the full example:
Dialog MyDialog= new Dialog(MyActivity.this);
MyDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
MyDialog.setContentView(R.layout.my_custom_dialog);
MyDialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));
MyDialog.show();