Search code examples
androidyoutube-apiandroid-youtube-apiandroid-touch-event

Youtube API - Touch Event Passed to Views Behind Youtube Player


I am using a YoutubeAndroidPlayerAPI in my Android App.

In my YouTubePlayerSupportFragment I am setting youtubePlayer.addFullscreenControlFlag(YouTubePlayer.FULLSCREEN_FLAG_CUSTOM_LAYOUT); so that I can change between Fullscreen without having to rebuffer each time I do so.

For that I removed the navigation bar please see my previous SO question about it. So now the player is playing fine. But somehow the touch events are passing down behind the player (i.e. to views behind youtube player) but Only when touch events are below the player's SeekBar (In FullScreen Mode).

Is there any workarounds to this problem?

Any one knows of any open issues regarding this issue?


Solution

  • Try adding android:clickable="true" to the top ViewGroup of your fragment's layout file.