title: YoutubePlayer - Navigation Bar Overlay
body: <p>I am using <code>YoutubePlayerSupportFragment</code> in my application. I am adding <code>YouTubePlayer.FULLSCREEN_FLAG_CUSTOM_LAYOUT</code> flag. From the <a href="https://developers.google.com/youtube/android/player/reference/com/google/android/youtube/player/YouTubePlayer#FULLSCREEN_FLAG_CUSTOM_LAYOUT" rel="nofollow">documentation</a> I know my player won't rebuffer after exiting from full screen, but now I have to handle Action Bar and Navigation Bar. But the documentation doesn't say or point to how I can handle these cases.</p>
  
  <p>Now the problem I am facing is so far only occurring in Asus Nexus 7 OS 5.1.1. I also have an LG G2 D802 OS 4.4.2, Samsung Galaxy TAB GT P5113 OS 4.4.2 and Samsung Galaxy Tab SM-T310 OS 4.2.2 and they do not throw Overlay Error. In the Log cat I get the following Message.</p>
  
  <pre><code>03-09 15:54:39.760  11203-11203/com.jadoo.jadooplus W/YouTubeAndroidPlayerAPI﹕ 
  YouTube video playback stopped due to unauthorized overlay on top of player. 
  The YouTubePlayerView is obscured by android.view.View{c067400 V.ED.... ........ 0,736-1280,800 #1020030 android:id/navigationBarBackground}.
  Top edge 24 px above YouTubePlayerView's bottom edge. .
  </code></pre>
  
  <p>So I know the problem <em>is</em> in the Navigation Bar. Navigation Bar is overlaying on  top of the Player.</p>
  
  <p>My Questions are these</p>
  
  <ul>
  <li>Why am I not getting the same Error on other devices? </li>
  <li>How Can I handle System Navigation Bar, so that when I am in fullscreen I can still get Navigation Bar if/when I want to stop the player (on back press) without overlaying it on the player.</li>
  </ul>
  
  <p>I tried Listening for Click Events But in Full Screen Mode I can't get any so I tried <code>Overriding</code> <code>dispatchTouchEvent()</code> in the Activity and get a Click event my self but even that doesn't help me get rid of Navigation Bar in Time (before time actually).</p>
  
  <p>I also tried listening for System UI change via <code>OnSystemUiVisibilityChangeListener</code> and hiding navigation bar there (but again perhaps too early to hide navigation bar).</p>
  
  <p>I have set <code>android:theme="@style/Theme.AppCompat.NoActionBar"</code> in android manifest file so I don't really need to hide the action/status bar just the navigation bar.</p>
  
  <p>Also if anyone can confirm it is device specific issue, it'll be a great help.</p>