I what the Dialog to cover up the whole screen width.
Hence:
Dialog dialog = new Dialog(this);
LayoutParams params = dialog.getWindow().getAttributes();
params.height = LayoutParams.MATCH_PARENT;
params.width = LayoutParams.MATCH_PARENT;
dialog.getWindow().setAttributes(params);
But the result is:
Skip is a button in a parent layout (MATCH_PARENT as width and height and 10dp padding and orange background).
Even in this answer the final result has some gaps on sides.
Is there a way to cover the whole screen width without any gaps?
The solution that worked for me was the following:
Grab the device dimensions using:
Then set the width of the dialog to the screen width