示例#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);
 }