Sets the activity in Fullscreen mode - Android User Interface

Android examples for User Interface:Screen Full

Description

Sets the activity in Fullscreen mode

Demo Code


//package com.java2s;
import android.app.Activity;

import android.view.WindowManager;

public class Main {
    /**/*from  w  ww.j  av a 2 s.co m*/
     * Sets the activity in Fullscreen mode
     *
     * @param activity
     *     the activity
     */
    public static void setFullScreen(Activity activity) {
        // Call before calling setContentView();
        activity.getWindow().setFlags(
                WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);
    }
}

Related Tutorials