setStatusBarColor

fun setStatusBarColor(activity: AppCompatActivity, @ColorInt statusBarColor: Int)

Given the toolbar's background color, set the status bar color to a slightly darker version if API levels allow.

Parameters

activity

activity to set the status bar color of

statusBarColor

the Toolbar's background color as reference to darken