美文网首页
隐藏虚拟按键,并且全屏

隐藏虚拟按键,并且全屏

作者: mapleSeriesX | 来源:发表于2019-03-25 09:52 被阅读0次

protected void hideBottomUIMenu() {
//隐藏虚拟按键,并且全屏
if (Build.VERSION.SDK_INT > 11 && Build.VERSION.SDK_INT < 19) { // lower api
View v = this.getWindow().getDecorView();
v.setSystemUiVisibility(View.GONE);
} else if (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);
    }
}

相关文章

网友评论

      本文标题:隐藏虚拟按键,并且全屏

      本文链接:https://www.haomeiwen.com/subject/bvomvqtx.html