@@ -140,6 +140,7 @@ class QuantityCardView @JvmOverloads constructor(context: Context, attrs: Attrib
140140 mTextColor = getColor(R .styleable.QuantityCardView_android_textColor , DEFAULT_TEXT_COLOR_QUANTITY )
141141 mTextSize = getDimension(R .styleable.QuantityCardView_android_textSize , DEFAULT_TEXT_SIZE_QUANTITY )
142142
143+ mTextColorDisabled = getColor(R .styleable.QuantityCardView_disabledButtonsTextColor , DEFAULT_TEXT_COLOR_DISABLED )
143144 mDecreaseTextColor = getColor(R .styleable.QuantityCardView_decreaseTextColor , DEFAULT_TEXT_COLOR_BUTTONS )
144145 mIncreaseTextColor = getColor(R .styleable.QuantityCardView_increaseTextColor , DEFAULT_TEXT_COLOR_BUTTONS )
145146 mIncreaseTextSize = getDimension(R .styleable.QuantityCardView_increaseTextSize , DEFAULT_TEXT_SIZE_INCREASE )
@@ -361,6 +362,13 @@ class QuantityCardView @JvmOverloads constructor(context: Context, attrs: Attrib
361362 setDecreaseTextColor(mDecreaseTextColor)
362363 }
363364
365+ /* *
366+ * Set Increasing' and Decreasing' TextViews text color when disabled.
367+ */
368+ fun setDisabledButtonsTextColor (@ColorInt color : Int ) {
369+ mTextColorDisabled = color
370+ }
371+
364372 /* *
365373 * Set ImageScaleType for the Decreasing ImageView.
366374 */
@@ -715,6 +723,7 @@ class QuantityCardView @JvmOverloads constructor(context: Context, attrs: Attrib
715723 mTextColor,
716724 mIncreaseTextColor,
717725 mDecreaseTextColor,
726+ mTextColorDisabled,
718727 mIncreaseTextSize,
719728 mDecreaseTextSize,
720729 mTextSize,
@@ -739,6 +748,7 @@ class QuantityCardView @JvmOverloads constructor(context: Context, attrs: Attrib
739748 mTextColor = myState?.textColor ? : DEFAULT_TEXT_COLOR_QUANTITY
740749 mIncreaseTextColor = myState?.textColorIncrease ? : DEFAULT_TEXT_COLOR_BUTTONS
741750 mDecreaseTextColor = myState?.textColorDecrease ? : DEFAULT_TEXT_COLOR_BUTTONS
751+ mTextColorDisabled = myState?.textColorDisabled ? : DEFAULT_TEXT_COLOR_DISABLED
742752 mIncreaseTextSize = myState?.textSizeIncrease ? : DEFAULT_TEXT_SIZE_INCREASE
743753 mDecreaseTextSize = myState?.textSizeDecrease ? : DEFAULT_TEXT_SIZE_DECREASE
744754 mTextSize = myState?.textSize ? : DEFAULT_TEXT_SIZE_QUANTITY
@@ -764,6 +774,7 @@ class QuantityCardView @JvmOverloads constructor(context: Context, attrs: Attrib
764774 val textColor : Int ,
765775 val textColorIncrease : Int ,
766776 val textColorDecrease : Int ,
777+ val textColorDisabled : Int ,
767778 val textSizeIncrease : Float ,
768779 val textSizeDecrease : Float ,
769780 val textSize : Float ,
0 commit comments