Example usage for android.view Window setStatusBarColor

List of usage examples for android.view Window setStatusBarColor

Introduction

In this page you can find the example usage for android.view Window setStatusBarColor.

Prototype

public abstract void setStatusBarColor(@ColorInt int color);

Source Link

Document

Sets the color of the status bar to color .

Usage

From source file:com.tct.mail.compose.ComposeActivity.java

@TargetApi(Build.VERSION_CODES.LOLLIPOP)
private void restoreStatusBarColor() {
    Window window = ComposeActivity.this.getWindow();
    if (window != null) {
        window.setStatusBarColor(getResources().getColor(R.color.restore_status_bar));
    }/*w  w w  .  ja v  a  2  s  .c  o  m*/
}