Java tutorial
//package com.java2s; import android.annotation.TargetApi; import android.app.Activity; import android.view.Window; import android.view.WindowManager; public class Main { @TargetApi(19) public static void setTranslucentStatus(Activity activity, boolean on) { Window win = activity.getWindow(); WindowManager.LayoutParams winParams = win.getAttributes(); final int bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS; if (on) { winParams.flags |= bits; } else { winParams.flags &= ~bits; } win.setAttributes(winParams); } }