title: Toggle Fullscreen mode
body: <p>I need some help toggling fullscreen mode. I have a setting in a preference screen to go fullscreen. In my main activity's onResume I have:</p>
  
  <pre><code>if(mFullscreen == true) {
                  getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
                  getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
  
              } else
              {
                  getWindow().addFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
                  getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
  
              }
  </code></pre>
  
  <p>But this doesn't seem to work because it needs to be called before <code>setContentView</code> right?</p>
  
  <p>... But Also, I have <code>requestWindowFeature(Window.FEATURE_NO_TITLE);</code> before <code>setContentView</code> and it takes away the title AND status bar... Can anybody offer some help?</p>
  
  <p>---Edit---
  Ok, I had a bug that was causing this to not work. So it actually does. Now, I just need to know how to toggle the title bar.</p>