/** * Setting the button to have hollow or solid shape * * @param ghost */ public void setGhost(boolean ghost) { this.mGhost = ghost; if (mIconView != null || mFontIconView != null || mTextView != null) { this.setupBackground(); } }
/** * Set Width of the button * * @param width : Width */ public void setBorderWidth(int width) { this.mBorderWidth = width; if (mIconView != null || mFontIconView != null || mTextView != null) { this.setupBackground(); } }
/** * Set Background color of the button * * @param color : use Color.parse('#code') */ public void setBackgroundColor(int color) { this.mDefaultBackgroundColor = color; if (mIconView != null || mFontIconView != null || mTextView != null) { this.setupBackground(); } }
/** * Set Disabled state color of the button border * * @param color : use Color.parse('#code') */ public void setDisableBorderColor(int color) { this.mDisabledBorderColor = color; if (mIconView != null || mFontIconView != null || mTextView != null) { this.setupBackground(); } }
/** * Set Focus color of the button * * @param color : use Color.parse('#code') */ public void setFocusBackgroundColor(int color) { this.mFocusBackgroundColor = color; if (mIconView != null || mFontIconView != null || mTextView != null) this.setupBackground(); }
/** * Set Disabled state color of the button * * @param color : use Color.parse('#code') */ public void setDisableBackgroundColor(int color) { this.mDisabledBackgroundColor = color; if (mIconView != null || mFontIconView != null || mTextView != null) this.setupBackground(); }
/** * Set color of the button border * * @param color : Color * use Color.parse('#code') */ public void setBorderColor(int color) { this.mBorderColor = color; if (mIconView != null || mFontIconView != null || mTextView != null) { this.setupBackground(); } }
/** * Set Border Radius of the button * * @param radius : Radius */ public void setRadius(int radius) { this.mRadius = radius; if (mIconView != null || mFontIconView != null || mTextView != null) { this.setupBackground(); } }
/** * Set Border Radius for each button corner * Top Left, Top Right, Bottom Left, Bottom Right * * @param radius : Array of int */ public void setRadius(int[] radius) { this.mRadiusTopLeft = radius[0]; this.mRadiusTopRight = radius[1]; this.mRadiusBottomLeft = radius[2]; this.mRadiusBottomRight = radius[3]; if (mIconView != null || mFontIconView != null || mTextView != null) { this.setupBackground(); } }