Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 794
sajjoo Avatar asked Jan 20 '11 15:01

sajjoo


2 Answers

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

like image 150
CeejeeB Avatar answered Oct 13 '22 00:10

CeejeeB


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); 
like image 30
Yahel Avatar answered Oct 13 '22 01:10

Yahel