Here you can find the source of setupFullScreen(Window window)
public static void setupFullScreen(Window window)
//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 } }