hide System Ui - Android User Interface

Android examples for User Interface:Screen Full

Description

hide System Ui

Demo Code


//package com.java2s;
import android.view.View;

public class Main {
    public static void hideSystemUi(View view) {
        int flags = view.getSystemUiVisibility() | flagsHideAllSystemUi();
        view.setSystemUiVisibility(flags);
    }/*from  www.j  av  a2 s.co  m*/

    private static int flagsHideAllSystemUi() {
        return View.SYSTEM_UI_FLAG_LAYOUT_STABLE
                | View.SYSTEM_UI_FLAG_FULLSCREEN
                | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
                | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
                | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
                | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
    }
}

Related Tutorials