⑴ android怎么屏蔽三个虚拟键
使用方法:1、安装xposed installer+Gravitybox(重力工具箱)
2、进入xposed installer,选择模块,勾选Gravitybox,重启手机使设置生效
3、打开Gravitybox,分别进入显示调整-扩展桌面模式-浸式虚拟按键,重启手机
4、打开Gravitybox,分别选择实体按键调整-返回键--长按动作-切换扩展桌面功能,退出,需要重启的就重启
5、接下来就是见证奇迹的时刻,从屏幕最下方向上滑动,就会调出虚拟键,如果不想隐藏虚拟键,就长按返回键,虚拟键正常显示,玩游戏或是看电影什么的需要隐藏虚拟键,就长按返回键,虚拟键就会自动隐藏!
⑵ Android 屏蔽下方虚拟按键
Android屏蔽手机虚拟按键
方法一
滑动屏幕可以显示
```
protectedvoidhideBottomUIMenu() {
//隐藏虚拟按键,并且全屏
if(Build.VERSION.SDK_INT > 11&& Build.VERSION.SDK_INT < 19) { // lower api
View v = this.getWindow().getDecorView();
v.setSystemUiVisibility(View.GONE);
} elseif(Build.VERSION.SDK_INT >= 19) {
//for new api versions.
View decorView = getWindow().getDecorView();
intuiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY | View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);
}
}
```
方法二
滑动也不能显示
```
protectedvoidhideBottomUIMenu() {
//隐藏虚拟按键,并且全屏
if(Build.VERSION.SDK_INT > 11&& Build.VERSION.SDK_INT < 19) { // lower api
View v = this.getWindow().getDecorView();
v.setSystemUiVisibility(View.GONE);
} elseif(Build.VERSION.SDK_INT >= 19) {
Window _window = getWindow();
WindowManager.LayoutParams params = _window.getAttributes();
params.systemUiVisibility = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION|View.SYSTEM_UI_FLAG_IMMERSIVE;
_window.setAttributes(params);
}
}
```
⑶ 怎样隐藏安卓机下方的三个虚拟键
Android 隐藏虚拟按键,可以使用谷歌官方提供的api里的SYSTEM_UI_FLAG_HIDE_NAVIGATION 这个标志位来完成,如下代码:
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
public class HideTestActivity extends Activity implements OnClickListener{
View main ;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
main = getLayoutInflater().from(this).inflate(R.layout.main, null);
main.setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);//设置虚拟键隐藏
main.setOnClickListener(this);//点击事件
setContentView(main);
}
@Override
public void onClick(View v) {
int i = main.getSystemUiVisibility();
if (i == View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) {
main.setSystemUiVisibility(View.SYSTEM_UI_FLAG_VISIBLE);//设置通知栏和虚拟键盘隐藏
} else if (i == View.SYSTEM_UI_FLAG_VISIBLE){
main.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);//设置通知栏隐藏
} else if (i == View.SYSTEM_UI_FLAG_LOW_PROFILE) {
main.setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);//设置虚拟键隐藏
}
}
}
⑷ android5.0镐庝箞鍏抽棴涓嬫柟铏氭嫙阌鐩
鍏抽棴瀹炰綋鎸夐敭镄勬柟娉
绗涓姝ワ绂钖屾牱浣跨敤RE鏂囦欢绠$悊鍣ㄤ慨鏀圭郴缁熺姸镐佷负璇诲啓
绗浜屾ワ细杩涘叆system/usr
/keylayout鐩褰曚笅
绗涓夋ワ细阃夋嫨cyttsp-button.kl锛堥暱鎸夐夋嫨浠ユ枃链鏂瑰纺缂栬緫锛
绗锲涙ワ细镓惧埌濡备笅淇℃伅
key 102 HOME VIRTUAL
key 139 MENU VIRTUAL