based on this link , the correct answer (which I tested myself):
put this code in the constructor or in the onCreate() method of the dialog box:
getWindow().setLayout(WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.MATCH_PARENT);
add a dialogue style:
<style name="full_screen_dialog"> <item name="android:windowFrame">@null</item> <item name="android:windowIsFloating">true</item> <item name="android:windowContentOverlay">@null</item> <item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item> <item name="android:windowSoftInputMode">stateUnspecified|adjustPan</item> </style>
this can be achieved using a constructor, for example:
public FullScreenDialog(Context context) { super(context, R.style.full_screen_dialog); ...
EDIT: An alternative to all of the above would be to set the style for android.R.style.Theme and what it is.
android developer Jun 03 2018-12-12T00: 00Z
source share