Android 动态切换全屏跟非全屏模式
Android 动态切换全屏和非全屏模式直接贴出代码:?else?{??????????????????????button.setText(getResourc
Android 动态切换全屏和非全屏模式
直接贴出代码:
?
else?{??- ????????????????????button.setText(getResources().getText(R.string.full_screen));??
- ????????????????????WindowManager.LayoutParams?params?=?getWindow().getAttributes();??
- ????????????????????params.flags?&=?(~WindowManager.LayoutParams.FLAG_FULLSCREEN);??
- ????????????????????getWindow().setAttributes(params);??
- ????????????????????getWindow().clearFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);??
- ????????????????}??
- ????????????}??
- ????????});??
- ??????????
- ????}??
- }??
?