title: Hiding navigation bar without rooting on android
body: <p>I want to make fullscreen application for android tablets and i try to hide navigation bar and for 4.0+. I read similar questions and answers to it but what i found are dont work for me. If it is not possible to hide navigation bar forever, how can i hide it and after make it visible with slide from bottom? I saw in some games and i think this is possible. So far i tried this and at first it hides navigation bar but when i touched the screen navigation bar become visible again and i dont want it.</p>
  
  <pre><code>decorView = getWindow().getDecorView();
      int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
              | View.SYSTEM_UI_FLAG_FULLSCREEN;
  decorView.setSystemUiVisibility(uiOptions);
  </code></pre>
  
  <p>and i also tried this but again doest work for me</p>
  
  <pre><code>decorView.setOnSystemUiVisibilityChangeListener
              (new View.OnSystemUiVisibilityChangeListener() {
          @Override
          public void onSystemUiVisibilityChange(int visibility) {
              // Note that system bars will only be "visible" if none of the
              // LOW_PROFILE, HIDE_NAVIGATION, or FULLSCREEN flags are set.
              if ((visibility &amp; View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) {
                  int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
                          | View.SYSTEM_UI_FLAG_FULLSCREEN;
            decorView.setSystemUiVisibility(uiOptions);
  
  
              } else {
                  int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
                          | View.SYSTEM_UI_FLAG_FULLSCREEN;
            decorView.setSystemUiVisibility(uiOptions);
              }
          }
      });
  </code></pre>
  
  <p>How can i hide it and make it visible with sliding from bottom or hide forever? 
  Please give me an advice. Thanks in advance</p>