private void full(boolean enable) { if (enable) {//隐藏状态栏 WindowManager.LayoutParams lp = getActivity().getWindow().getAttributes(); lp.flags |= WindowManager.LayoutParams.FLAG_FULLSCREEN; getActivity().getWindow().setAttributes(lp); } else {//显示状态栏 WindowManager.LayoutParams attr = getActivity().getWindow().getAttributes(); attr.flags &= (~WindowManager.LayoutParams.FLAG_FULLSCREEN); getActivity(). getWindow().setAttributes(attr); } }
记录显示及隐藏状态栏
最新推荐文章于 2024-07-19 11:42:08 发布