request Fullscreen - Android User Interface

Android examples for User Interface:Screen Full

Description

request Fullscreen

Demo Code


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

public class Main {
    public static void requestFullscreen(final Activity mActivity) {
        final Window window = mActivity.getWindow();
        window.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
        window.clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
        window.requestFeature(Window.FEATURE_NO_TITLE);
    }//from  w ww  .ja  v a  2  s. co m
}

Related Tutorials