make Window Full Screen - Android User Interface

Android examples for User Interface:Screen Full

Description

make Window Full Screen

Demo Code

/*******************************************************************************
 * Copyright (c) 2012 Vincenzo Marzano./*  w  w w . j a va2  s  .  c  o  m*/
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Public License v3.0
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/gpl.html
 * 
 * Contributors:
 *     Vincenzo Marzano - initial API and implementation
 ******************************************************************************/
//package com.java2s;
import android.app.Activity;

import android.view.Window;
import android.view.WindowManager;

public class Main {
    public static void makeFullScreen(Activity a) {
        a.requestWindowFeature(Window.FEATURE_NO_TITLE);
        a.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);

    }
}

Related Tutorials