Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make an Alert dialog in full screen in Android?

Tags:

How to make an Alert Dialog in full screen in Android?

like image 838
user6629610 Avatar asked Jul 23 '16 17:07

user6629610


People also ask

How do I make alert Dialog fill 90% of screen size?

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.)

How do you inflate Dialog?

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.


1 Answers

Try below code

AlertDialog.Builder alertDialog = new AlertDialog.Builder(this,android.R.style.Theme_Black_NoTitleBar_Fullscreen);
like image 184
emrekose26 Avatar answered Oct 01 '22 15:10

emrekose26