title: Fullscreen in WindowManager
body: <p>This is my code:</p>
  
  <pre class="lang-java prettyprint-override"><code>params = new WindowManager.LayoutParams(
      WindowManager.LayoutParams.FLAG_FULLSCREEN,
      WindowManager.LayoutParams.FLAG_FULLSCREEN,
      WindowManager.LayoutParams.TYPE_SYSTEM_OVERLAY,
      WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN,
      PixelFormat.TRANSLUCENT);
  
  wm = (WindowManager) getApplicationContext()
      .getSystemService(Context.WINDOW_SERVICE);
  
  inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
  mTopView = (ViewGroup) inflater.inflate(R.layout.activity_invisible, null);
  
  params.flags = WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE
      | WindowManager.LayoutParams.FLAG_DIM_BEHIND
      | WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
      | WindowManager.LayoutParams.FLAG_FULLSCREEN;
  
  if (keep==true) {
      int value = brightnessIntent.getExtras().getInt("value");
      float v=value/255.0f;
      params.dimAmount=0;
      params.alpha=v;
      rl = (RelativeLayout) mTopView.findViewById(R.id.window);
  
      getWindow().setAttributes(params);
      getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
      getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
  
      WindowManager.LayoutParams.FLAG_FULLSCREEN);
      wm.addView(mTopView, params);
  }
  </code></pre>
  
  <p>The view still shows the status bar, <code>mTopView</code> is an overlay window. How do I get the overlay window to cover the entire screen? I don't want to "hide" the status bar, I want my activity to overlay onto it.</p>
  
  <p><b>[EDIT]</b> <em>emphasized text</em>
  I already have this in my <code>onCreate()</code> method:</p>
  
  <pre><code>requestWindowFeature(Window.FEATURE_NO_TITLE); 
  this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
  </code></pre>
  
  <p>And my manifest defines a style which features fullscreen.</p>
  
  <p><b>SCREENSHOTS</b></p>
  
  <p><a href="https://i.stack.imgur.com/LAbMf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LAbMf.png" alt="enter image description here"></a></p>
  
  <p>This is how it is currently, I want the overlay to extend to the status bar too.</p>