Android examples for User Interface:Window
initialize, Do all sorts of common task for your activities
//package com.java2s; import android.app.Activity; import android.content.pm.ActivityInfo; import android.view.Window; import android.view.WindowManager; public class Main { public static void initialize(Activity activity) { //Do all sorts of common task for your activities here including: activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); activity.requestWindowFeature(Window.FEATURE_NO_TITLE); activity.getWindow().setFlags(//from w ww . jav a2s . c om WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); } }