Set System non Sticky Immersion - Android User Interface

Android examples for User Interface:Screen Full

Description

Set System non Sticky Immersion

Demo Code


//package com.java2s;
import android.annotation.TargetApi;

import android.os.Build;
import android.view.View;

public class Main {
    private static View view;

    @TargetApi(Build.VERSION_CODES.KITKAT)
    public static void nonStickyImmersion() {
        int uiOption = 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;

        view.setSystemUiVisibility(uiOption);
    }//from   w w w  . ja  va  2  s  .co  m
}

Related Tutorials