Questions Thread - October 21, 2016

I'm looking for the correct way to handle full screen mode for a video player-type application (if that matters, guessing it doesn't). I want the video to play full screen, regardless of the visibility of the system UI (navigation buttons, status bar). If you've used YouTube on a Nexus device, you know exactly what I want.

The official recommendations on the Android site do not produce the desired effect -- they suggest using SYSTEM_UI_FLAG_FULLSCREEN and SYSTEM_UI_FLAG_HIDE_NAVIGATION and explicitly say not to use the immersive flags, but as you can tell if you test this you'll see that the app's UI elements get resized when the system UI reappears on touch.

I'm guessing I'm missing some arcane combination of fitsSystemWindows and/or clipToPadding flags that are not mentioned in the immersive documentation. The documentation for fitsSystemWindows makes it sound like I should be setting it to true, but while that does have an effect the app's UI is still jibbered when the system UI appears.

This guy says that I should "use the system, don't fight it", which suggests this should be easy stuff and I'm missing something obvious.

/r/androiddev Thread