How to make an Alert Dialog in full screen in Android?
Builder adb = new AlertDialog. Builder(this); Dialog d = adb. setView(new View(this)). create(); // (That new View is just there to have something inside the dialog that can grow big enough to cover the whole screen.)
To inflate the layout in your DialogFragment , get a LayoutInflater with getLayoutInflater() and call inflate() , where the first parameter is the layout resource ID and the second parameter is a parent view for the layout. You can then call setView() to place the layout in the dialog.
Try below code
AlertDialog.Builder alertDialog = new AlertDialog.Builder(this,android.R.style.Theme_Black_NoTitleBar_Fullscreen);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With