@@ -140,6 +140,7 @@ class QuantityCardView @JvmOverloads constructor(context: Context, attrs: Attrib
140
140
mTextColor = getColor(R .styleable.QuantityCardView_android_textColor , DEFAULT_TEXT_COLOR_QUANTITY )
141
141
mTextSize = getDimension(R .styleable.QuantityCardView_android_textSize , DEFAULT_TEXT_SIZE_QUANTITY )
142
142
143
+ mTextColorDisabled = getColor(R .styleable.QuantityCardView_disabledButtonsTextColor , DEFAULT_TEXT_COLOR_DISABLED )
143
144
mDecreaseTextColor = getColor(R .styleable.QuantityCardView_decreaseTextColor , DEFAULT_TEXT_COLOR_BUTTONS )
144
145
mIncreaseTextColor = getColor(R .styleable.QuantityCardView_increaseTextColor , DEFAULT_TEXT_COLOR_BUTTONS )
145
146
mIncreaseTextSize = getDimension(R .styleable.QuantityCardView_increaseTextSize , DEFAULT_TEXT_SIZE_INCREASE )
@@ -361,6 +362,13 @@ class QuantityCardView @JvmOverloads constructor(context: Context, attrs: Attrib
361
362
setDecreaseTextColor(mDecreaseTextColor)
362
363
}
363
364
365
+ /* *
366
+ * Set Increasing' and Decreasing' TextViews text color when disabled.
367
+ */
368
+ fun setDisabledButtonsTextColor (@ColorInt color : Int ) {
369
+ mTextColorDisabled = color
370
+ }
371
+
364
372
/* *
365
373
* Set ImageScaleType for the Decreasing ImageView.
366
374
*/
@@ -715,6 +723,7 @@ class QuantityCardView @JvmOverloads constructor(context: Context, attrs: Attrib
715
723
mTextColor,
716
724
mIncreaseTextColor,
717
725
mDecreaseTextColor,
726
+ mTextColorDisabled,
718
727
mIncreaseTextSize,
719
728
mDecreaseTextSize,
720
729
mTextSize,
@@ -739,6 +748,7 @@ class QuantityCardView @JvmOverloads constructor(context: Context, attrs: Attrib
739
748
mTextColor = myState?.textColor ? : DEFAULT_TEXT_COLOR_QUANTITY
740
749
mIncreaseTextColor = myState?.textColorIncrease ? : DEFAULT_TEXT_COLOR_BUTTONS
741
750
mDecreaseTextColor = myState?.textColorDecrease ? : DEFAULT_TEXT_COLOR_BUTTONS
751
+ mTextColorDisabled = myState?.textColorDisabled ? : DEFAULT_TEXT_COLOR_DISABLED
742
752
mIncreaseTextSize = myState?.textSizeIncrease ? : DEFAULT_TEXT_SIZE_INCREASE
743
753
mDecreaseTextSize = myState?.textSizeDecrease ? : DEFAULT_TEXT_SIZE_DECREASE
744
754
mTextSize = myState?.textSize ? : DEFAULT_TEXT_SIZE_QUANTITY
@@ -764,6 +774,7 @@ class QuantityCardView @JvmOverloads constructor(context: Context, attrs: Attrib
764
774
val textColor : Int ,
765
775
val textColorIncrease : Int ,
766
776
val textColorDecrease : Int ,
777
+ val textColorDisabled : Int ,
767
778
val textSizeIncrease : Float ,
768
779
val textSizeDecrease : Float ,
769
780
val textSize : Float ,
0 commit comments