Question Detail

How to make full screen dialog in android?

6 years ago Views 2947 Visit Post Reply

I have tried many variants to create full-screen dialog but I couldn't. How to create customize DialogBox. I need something, like this : 

Qna full-screen dialogs android open animation

Please Help me for creating this type of Dialog Box.

Thread Reply


- 6 years ago

The easiest way I found

Dialog dialog=new Dialog(this,;


- 5 years ago

You have to set Height and Width to create full-screen dialog android material design. Below I have mentioned how to create full-screen custom dialog android

    DisplayMetrics metrics = getResources().getDisplayMetrics();
    int width = metrics.widthPixels;
    int height = metrics.heightPixels;
    dialog = new Dialog(this);
    dialog.setTitle("Select Your Way!");
    dialog.getWindow().setLayout((6 * width) / 6, WindowManager.LayoutParams.MATCH_PARENT);