set Activity no title and no status bar - Android Activity

Android examples for Activity:Activity Title

Description

set Activity no title and no status bar

Demo Code


//package com.java2s;

import android.app.Activity;

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

public class Main {
    /**//from   w ww.  j  a  va2  s .c  om
     * set no title and no status bar
     * 
     * @param activity
     */
    public static void setNoTitleAndNoStatusBarScreen(Activity activity) {
        activity.requestWindowFeature(Window.FEATURE_NO_TITLE);
        activity.getWindow().setFlags(
                WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);
    }
}

Related Tutorials