简体   繁体   中英

webview with full screen in android

i have made a simple hello web view example and i want to make it in full screen like i do not want that two top most black bars. anybody have any idea how to do that?

thanks a lot.

The quickest way to do this would be to add

android:theme="@android:style/Theme.NoTitleBar.Fullscreen"

Into your activity in the AndroidManifest.xml file

Alternatively you can do it programmatically in the OnCreate method of your Activity :

//Full screen
requestWindowFeature(Window.FEATURE_NO_TITLE); 
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM