lower Status Bar Visibility - Android User Interface

Android examples for User Interface:StatusBar

Description

lower Status Bar Visibility

Demo Code


//package com.java2s;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;

public class Main {
    @SuppressLint("NewApi")
    public static void lowerStatusBarVisibility(Activity activity) {
        Window localWindow = activity.getWindow();
        WindowManager.LayoutParams localLayoutParams = localWindow
                .getAttributes();//from   w  w  w . ja v a  2 s .c  om
        localLayoutParams.systemUiVisibility = View.SYSTEM_UI_FLAG_LOW_PROFILE;
        localWindow.setAttributes(localLayoutParams);
    }
}

Related Tutorials