I\'m using YouTubePlayer (YouTube api for android) within a Fragment I am inflating a LinearLayout with the YouTube Player, in this way:
fragmentManager = ge
1.add fitSystemWindows. 2.getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN | WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);