Example usage for android.support.v4.app SystemBarTintManager setNavigationBarTintColor

List of usage examples for android.support.v4.app SystemBarTintManager setNavigationBarTintColor

Introduction

In this page you can find the example usage for android.support.v4.app SystemBarTintManager setNavigationBarTintColor.

Prototype

public void setNavigationBarTintColor(int color) 

Source Link

Document

Apply the specified color tint to the system navigation bar.

Usage

From source file:drawnzer.anurag.kollosal.KollosalPlayer.java

private void init_system_ui() {
    // TODO Auto-generated method stub
    if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT)
        return;/*w  w  w.j  ava2s . co  m*/

    SystemBarTintManager tinter = new SystemBarTintManager(KollosalPlayer.this);
    SystemBarTintManager.SystemBarConfig conf = tinter.getConfig();
    boolean isNavBar = conf.hasNavigtionBar();
    if (isNavBar) {
        tinter.setNavigationBarTintEnabled(true);
        tinter.setNavigationBarTintColor(currentColor);
    }
    tinter.setStatusBarTintEnabled(true);
    tinter.setStatusBarTintColor(currentColor);
    LinearLayout ls = (LinearLayout) findViewById(R.id.lists_layout);
    LinearLayout frame = (LinearLayout) findViewById(R.id.frame_container);
    frame.setPadding(0, getStatusBarHeight(), 0, isNavBar ? getNavigationBarHeight() : 0);
    ls.setPadding(0, getStatusBarHeight(), 0, isNavBar ? getNavigationBarHeight() : 0);
}