[英]How can I disable the home, power and search buttons on Android 4.0+?
如何在Android 4.0+上禁用主页,电源和搜索按钮?
You can hide them using SYSTEM_UI_FLAG_HIDE_NAVIGATION
: 您可以使用
SYSTEM_UI_FLAG_HIDE_NAVIGATION
隐藏它们:
myView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
This property is only in 4.0+. 此属性仅适用于4.0+。 The closest 3.0+ gets is
SYSTEM_UI_FLAG_LOW_PROFILE
. 最接近3.0的版本是
SYSTEM_UI_FLAG_LOW_PROFILE
。
But they should not (if they even can) be permanently disabled; 但是,他们(如果可以的话)不应该被永久禁用; imagine how you'd feel if an app took away your ability to use the "home" button, then started an infinite loop.
想象一下,如果某个应用程序失去了使用“主页”按钮的能力,然后开始无限循环的感觉。
Edit : Wait, just read "Home, Power, and Search" buttons. 编辑 :等待,只需阅读“家庭,电源和搜索”按钮。 You can't disable the power button (that would be silly), and most Android 4.0 phones don't have a dedicated search button unless they are upgrades of 2.3 devices (Galaxy S II, for example).
您无法禁用电源按钮(这很愚蠢),并且大多数Android 4.0手机没有专用的搜索按钮,除非它们是2.3设备的升级版(例如Galaxy S II)。 My above info covers the soft Home, Back, and Recent Apps keys.
我上面的信息涵盖了“主页”,“后退”和“最近使用的应用程序”软键。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.