Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Popup Window Full Screen

I want to create a popupwindow for fullscreen

i've used the following :

LayoutInflater inflater = (LayoutInflater) MainActivity.this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);

layoutt = inflater.inflate(R.layout.loginto,(ViewGroup) findViewById(R.id.window1));

pwindow = new PopupWindow(layoutt,LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT,true);

This covers the action bar but not the full screen..

Also LayuotParams.WRAP_CONTENT is supported by api 11+ . i need the solution to work from api level 8.

like image 416
mkumar Avatar asked Jun 28 '14 12:06

mkumar


1 Answers

For the full screen you have to pass the MATCH_PARENT params instead of WRAP_CONTENT

pwindow = new PopupWindow(layout,LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT,true);
like image 151
GovindRathod Avatar answered Oct 05 '22 23:10

GovindRathod