Turn Activity as Full Screen - Android android.app

Android examples for android.app:Screen

Description

Turn Activity as Full Screen

Demo Code

import android.app.Activity;
import android.view.Window;
import android.view.WindowManager;

public class Main {

  public static void asFullScreen(Activity activity) {
    activity.requestWindowFeature(Window.FEATURE_NO_TITLE);
    activity.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
        WindowManager.LayoutParams.FLAG_FULLSCREEN);
  }//from  w  ww. j a  v a 2s .  c  om

}

Related Tutorials