Java tutorial
//package com.java2s; import android.app.Activity; import android.os.Build; import android.view.View; public class Main { public static void setDarkIcon(Activity activity) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { activity.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR); } } }