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

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

Introduction

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

Prototype

public void setNavigationBarTintEnabled(boolean enabled) 

Source Link

Document

Enable tinting of 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;/*from   w w  w  .  j  av  a 2 s. c o 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);
}