List of usage examples for android.content.res ColorStateList isStateful
@Override public boolean isStateful()
From source file:am.widget.indicatortabstrip.IndicatorTabStrip.java
/** * ??/*from w w w . j a v a 2 s.c o m*/ * * @param gradient ?? */ public void setGradient(ColorStateList gradient) { if (gradient == null) { mGradient = null; invalidate(); } else if (mGradient != gradient && gradient.isStateful()) { mGradient = gradient; invalidate(); } else { setItemBackground(new ColorDrawable(gradient.getDefaultColor())); } }