Code example for ColorStateList

Methods: isStateful

0
    public boolean isStateful() { 
        /* 
         * The drawable's ability to represent state is based on 
         * the text color list set 
         */ 
        return mTextColors.isStateful();
    } 
 
    @Override 
    protected boolean onStateChange(int[] state) {
        //Upon state changes, grab the correct text color 
        return updateTextColors(state);
    } 
 
    @Override 
    public int getIntrinsicHeight() { 
        //Return the vertical bounds measured, or -1 if none 
        if (mTextBounds.isEmpty()) {
            return -1; 
        } else { 
Stop searching for code, let great code find you!  Add Codota to your java IDE