Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make full screen in Android 4.0

Android 4.0 phones only have virtual buttons, which actually go invisible when playing youtube/video at fullscreen (the video portion takes over where the buttons are).

I want to do this, but haven't found a way.

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

or

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

do not cover the virtual buttons.

Here is an example that shows the type of full screen I'm talking about:

http://www.youtube.com/watch?v=Lw_O1JpmPns

like image 953
Darcy Avatar asked Dec 30 '11 15:12

Darcy


People also ask

How do I make my mobile full screen?

Tapping the Menu button (three vertical dots) in the upper right-hand corner of the screen (or tap the hardware menu button on those devices having one) Selecting Add to homescreen from the menu. Tapping the Add button in the pop up dialog. Then, from the home screen, tap the app icon to open in fullscreen mode.


1 Answers

Okay, I added this SYSTEM_UI_FLAG_HIDE_NAVIGATION flag to my video activity and that hid the virtual buttons.

WebView view = new WebView(this);
view.setSystemUiVisibility(WebView.SYSTEM_UI_FLAG_HIDE_NAVIGATION);

Another choice is to use the SYSTEM_UI_FLAG_LOW_PROFILE flag. This doesn't hide the buttons though. Instead it makes the buttons go to "Low Profile" mode (basically turns them into little dots)

like image 172
Darcy Avatar answered Oct 19 '22 23:10

Darcy