android - Showing AlertDialog with webview in full screen -
in app, loading google docs url in webview , displaying webview part of alert dialog. following code using:
alertdialog.builder alert = new alertdialog.builder( mockexamactivity.this); alert.settitle(r.string.writing_title); webview wv = new webview(mockexamactivity.this); wv.getsettings().setjavascriptenabled(true); wv.loadurl("https://docs.google.com/file/d/string/edit?usp=sharing"); wv.setwebviewclient(new webviewclient() { @override public boolean shouldoverrideurlloading(webview view, string url) { view.loadurl(url); return true; } }); alert.setnegativebutton("close", new dialoginterface.onclicklistener() { @override public void onclick(dialoginterface dialog, int id) { } }); dialog d = alert.setview(wv).create(); d.show(); windowmanager.layoutparams lp = new windowmanager.layoutparams(); lp.copyfrom(d.getwindow().getattributes()); lp.width = windowmanager.layoutparams.fill_parent; lp.height = windowmanager.layoutparams.fill_parent; d.getwindow().setattributes(lp); but see is:

any idea, how can make dialog take full screen space?
you can use custom dialog , set non dialog theme same such android.r.style.theme or android.r.style.theme_light.
dialog dialog=new dialog(activityname.this,android.r.style.theme); https://groups.google.com/forum/#!topic/android-developers/ndfo9pf8shy
Comments
Post a Comment