title: Android disable overlay of ActionBar and NavigationBar for FLAG_TRANSLUCENT
body: <p><img src="https://i.stack.imgur.com/YxsSJ.png" alt="picture with actionbar and navigationbar overlaying its child"></p>
  
  <p>As you can see by the picture the navigationbar and the statusbar is overlaying the layout. All I have done is</p>
  
  <pre><code>if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.KITKAT) {
          Window w = getWindow();
          w.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION, WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
          w.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS, WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); w.setFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN,WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
  
      }
  </code></pre>
  
  <p>I have tried to disable the overlay by doing :</p>
  
  <pre><code>w.clearFlags(View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
          w.clearFlags(View.SYSTEM_UI_FLAG_FULLSCREEN);
          w.setFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN,WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
  </code></pre>
  
  <p>but with no success. Help  is appreciated with a 1up</p>
  
  <p>Thank you</p>