赞
踩
我目前实现在Activity中重写 public Window getWindow()在里边写
/全屏显示/
View decorView = super.getWindow().getDecorView();
decorView.setSystemUiVisibility(0);
int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY | View.SYSTEM_UI_FLAG_FULLSCREEN |
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);
@Override public Window getWindow() { /*全屏显示*/ View decorView = super.getWindow().getDecorView(); decorView.setSystemUiVisibility(0); int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY | View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN; decorView.setSystemUiVisibility(uiOptions); //app_Window appwindowzz= new app_Window(this,super.getWindow()); //WindowManager wmra=(WindowManager)getSystemService(android.content.Context.WINDOW_SERVICE); Window windowat= super.getWindow() ; //windowat.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);//全屏 windowat.getDecorView().setBackgroundColor(Color.parseColor("#D61509")); //Toast.makeText(this," 获取Window ",Toast.LENGTH_SHORT).show(); return windowat; }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。