title: full screen application android
body: <p>i have two questions:</p>
  
  <ol>
  <li>one how can i run my application in full screen</li>
  <li>how video players run videos in full screen.</li>
  </ol>
  
  <p>i have tried alot and still struggling to achieve this but couldn't find a solution.</p>
  
  <p>the list of solution i found but they are not fulfilling my requirements</p>
  
  <ul>
  <li><p>this hides only the notification bar.</p>
  
  <pre><code>requestWindowFeature(Window.FEATURE_NO_TITLE);
  </code></pre>
  
  <p>getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);</p></li>
  <li><p>also hides only the notification bar</p>
  
  <pre><code>android:label="@string/app_name"
  android:theme="@android:style/Theme.NoTitleBar.Fullscreen"&gt;
  </code></pre></li>
  <li><p>it low profiles the navigation bar not hiding it.</p>
  
  <p>getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);</p></li>
  <li><p>no effect on my activity.</p>
  
  <p>anyView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);</p></li>
  </ul>
  
  <p>note that:</p>
  
  <ul>
  <li>i am not talking about rooting a device,so please provide those solutions which can work     without rooting a device.</li>
  <li>i am not talking about hiding only notification bar,but full screen by hiding both navigation bar and notification bar too.</li>
  <li>i am talking about jelly beans api 4.1 or greater than 4.1 version of android</li>
  <li>and please give answers with code.</li>
  </ul>
  
  <p>after my research and your answers, i am getting this:</p>
  
  <p><img src="https://i.stack.imgur.com/gWMVZ.jpg" alt="enter image description here"></p>
  
  <p>but my app should look like this without navigation bar:</p>
  
  <p><img src="https://i.stack.imgur.com/xcVsG.jpg" alt="enter image description here"></p>
  
  <p>i do not want the system navigation bar visible in my app.</p>