当前位置: 代码迷 >> Android >> Android随便时刻、任意代码处全屏
  详细解决方案

Android随便时刻、任意代码处全屏

热度:51   发布时间:2016-04-28 02:19:16.0
Android任意时刻、任意代码处全屏
public void toggleFullscreen(boolean fullScreen) {  //fullScreen为true时全屏,否则相反       WindowManager.LayoutParams attrs = getWindow().getAttributes();          if (fullScreen)     {         attrs.flags |= WindowManager.LayoutParams.FLAG_FULLSCREEN;     }     else     {         attrs.flags &= ~WindowManager.LayoutParams.FLAG_FULLSCREEN;     }          getWindow().setAttributes(attrs); }

  相关解决方案