Java tutorial
//package com.java2s; //License from project: Open Source License import android.annotation.TargetApi; import android.os.Build; import android.view.Window; public class Main { @TargetApi(Build.VERSION_CODES.LOLLIPOP) private static void setTranslucentStatusBarLollipop(Window window, int color) { if (color != 0) window.setStatusBarColor(color); // window.getContext() // .getResources() // .getColor(R.color. / add here your translucent color code /)); } }