Java tutorial
//package com.java2s; import android.app.Activity; import android.os.Build; public class Main { public static void setPureColor(Activity activity, int color) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { activity.getWindow().setStatusBarColor(color); } } }