Пример #1
0
 private void updateTint() {
   if (tint == null) tint = new TintPrimaryColorStateList(getContext());
   int color = tint.getColorForState(getDrawableState(), tint.getDefaultColor());
   if (leftGlow != null) leftGlow.setColor(color);
   if (rightGlow != null) rightGlow.setColor(color);
   postInvalidate();
 }
Пример #2
0
 private void updateTint() {
   if (tint == null) return;
   int color = tint.getColorForState(getDrawableState(), tint.getDefaultColor());
   if (leftGlow != null) leftGlow.setColor(color);
   if (rightGlow != null) rightGlow.setColor(color);
 }