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

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

Introduction

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

Prototype

public SystemBarConfig getConfig() 

Source Link

Document

Get the system bar configuration.

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  av  a  2  s  .com

    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);
}