Set Window to no Title And Full Screen - Android User Interface

Android examples for User Interface:Window

Description

Set Window to no Title And Full Screen

Demo Code


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

public class Main {
    public static void noTitleAndFullScreen(Activity activity) {
        noTitle(activity);//from   www .  j  av a  2s. c o m
        fullScreen(activity);
    }

    public static void noTitle(Activity activity) {
        activity.requestWindowFeature(Window.FEATURE_NO_TITLE);
    }

    public static void fullScreen(Activity activity) {
        activity.getWindow().setFlags(
                WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);
    }
}

Related Tutorials