Code example for ColorStateList

Methods: isStateful

0
        mBorderPaint.setStrokeWidth(border);
    } 
 
    @Override 
    public boolean isStateful() { 
        return mBorderColor.isStateful();
    } 
 
    @Override 
    protected boolean onStateChange(int[] state) {
        int newColor = mBorderColor.getColorForState(state, 0);
        if (mBorderPaint.getColor() != newColor) {
            mBorderPaint.setColor(newColor);
            return true; 
        } else { 
            return super.onStateChange(state);
        } 
    } 
 
    protected void setScaleType(ScaleType scaleType) {
Connect your IDE to all the code out there  Get Codota for Java