/** * 初始化通知栏样式 * * @param isNavigationBarGray 是否灰色样式 输入true就为color_333333,,,,,,,,,输入为false就为color_005799 */ @Override public void initNavigationBarStyle(boolean isNavigationBarGray) { // Only set the tint if the device is running KitKat or above if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { SystemBarTintManager tintManager = new SystemBarTintManager(this); tintManager.setStatusBarTintEnabled(true); tintManager.setStatusBarTintColor(getResources().getColor( isNavigationBarGray ? R.color.color_333333 : R.color.color_005799)); } }
设置状态通知栏的颜色
最新推荐文章于 2019-05-09 10:01:53 发布