public void addSystemIconView(ImageView imageView, boolean applyColor) { if (!mSystemIconViews.contains(imageView)) mSystemIconViews.add(imageView); if (applyColor) { imageView.setColorFilter(mColorForStatusIcons, mSettingsHelper.getSystemIconCfType()); } }
public void setStatusBarIconsTint(int iconTint) { if (mSettingsHelper.shouldLinkStatusBarAndNavBar() && !mKeyboardUp) { mNavigationBarIconTint = iconTint; setNavigationBarIconTint(iconTint, true); } if (mSettingsHelper.shouldForceWhiteTintWithOverlay()) { iconTint = Color.parseColor("#ccffffff"); } mColorForStatusIcons = iconTint; try { if (mSystemIconViews != null) { for (ImageView view : mSystemIconViews) { if (view != null) { view.setColorFilter(iconTint, mSettingsHelper.getSystemIconCfType()); } else { mSystemIconViews.remove(view); } } } if (mNotificationIconViews != null) { for (ImageView view : mNotificationIconViews) { if (view != null) { view.setColorFilter(iconTint, mSettingsHelper.getNotificationIconCfType()); } else { mNotificationIconViews.remove(view); } } } if (mTextLabels != null) { for (TextView view : mTextLabels) { if (view != null) { view.setTextColor(iconTint); } else { mTextLabels.remove(view); } } } if (mStatusBarView != null) { Intent intent = new Intent("gravitybox.intent.action.STATUSBAR_COLOR_CHANGED"); intent.putExtra("iconColorEnable", true); intent.putExtra("iconColor", iconTint); mStatusBarView.getContext().sendBroadcast(intent); } } catch (Exception e) { e.printStackTrace(); } setColorForLayout(mStatusIcons, iconTint, mSettingsHelper.getNotificationIconCfType()); setKitKatBatteryColor(iconTint); }