Making android video app full screen

The making android video app full screen tutorial describes how to use Kitkat’s immersive full-screen mode to create a full screen app.

The android video app full screens tutorial comes recommended for android beginners and people new to android.

Get Code

The code relating to this tutorial can be found here

https://github.com/mobapptuts/android_camera2_api_video_app.git Tag camera2-video-full-screen

or you can run this command

git clone https://github.com/mobapptuts/android_camera2_api_video_app.git –branch camera2-video-full-screen

Steps

camera2-video-full-screen
This immersive full-screen support is only provided in Android 4.4 (API Level 19) and above. For this application we will be implementing sticky full screen immersion which will temporary show the system bars before returning back to full screen.

To implement sticky immersion you need to override this method onWindowFocusChanged().

@Override
    public void onWindowFocusChanged(boolean hasFocus) {
        super.onWindowFocusChanged(hasFocus);
        View decorView = getWindow().getDecorView();
        if (hasFocus) {
            decorView.setSystemUiVisibility(
                    View.SYSTEM_UI_FLAG_LAYOUT_STABLE
                            | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
                            | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
                            | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
                            | View.SYSTEM_UI_FLAG_FULLSCREEN
                            | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);}
    }

Making android video app full screen tutorial recap

In this android tutorial you will have learned how to implement Android KitKat full-screen sticky immersion mode to convert your app to full screen.

About The Author
-

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>