Android Screen Full Screen Set setupFullScreen(Window window)

Here you can find the source of setupFullScreen(Window window)

Description

setup Full Screen

License

Open Source License

Declaration

public static void setupFullScreen(Window window) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import android.os.Build;

import android.view.View;
import android.view.Window;

public class Main {
    public static void setupFullScreen(Window window) {
        // on android versions greater than or equal to kitkat, use immersive mode for the view.  this will truly make the app fullscreen
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
            window.getDecorView().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);
        }//from   w ww.j  a  v  a 2s  .c om
    }
}

Related

  1. requestFullscreen(final Activity pActivity)
  2. requestFullscreen(final Activity pActivity)
  3. setFullScreen(Activity activity)
  4. setFullScreen(Activity activity)
  5. toggleFullScreen(Activity activity, boolean isFull)