如何充分屏幕的Andr​​oid 4.0 [英] How to make full screen in Android 4.0

查看:243
本文介绍了如何充分屏幕的Andr​​oid 4.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Android 4.0的手机只能有虚拟按键,在播放全屏YouTube的/视频时,实际上隐身(视频部分接管的按钮在哪里)。

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"

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

推荐答案

好吧,我加了这个 SYSTEM_UI_FLAG_HIDE_NAVIGATION 标志,以我的视频活动,并且躲到了虚拟按键。

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);

另一种选择是使用 SYSTEM_UI_FLAG_LOW_PROFILE 标记。这不能掩盖的按钮虽然。相反,它使得按钮进入低调模式(基本上把他们变成小点)

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)

这篇关于如何充分屏幕的Andr​​oid 4.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆