开发者

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. anyb开发者_如何学Cody 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); 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜