diff --git a/library/src/main/java/com/rengwuxian/materialedittext/MaterialAutoCompleteTextView.java b/library/src/main/java/com/rengwuxian/materialedittext/MaterialAutoCompleteTextView.java index bf86683e..fbf0e2ee 100644 --- a/library/src/main/java/com/rengwuxian/materialedittext/MaterialAutoCompleteTextView.java +++ b/library/src/main/java/com/rengwuxian/materialedittext/MaterialAutoCompleteTextView.java @@ -1288,7 +1288,7 @@ protected void onDraw(@NonNull Canvas canvas) { // draw the characters counter if ((hasFocus() && hasCharatersCounter()) || !isCharactersCountValid()) { - textPaint.setColor(isCharactersCountValid() ? getCurrentHintTextColor() : errorColor); + textPaint.setColor(isCharactersCountValid() ? (baseColor & 0x00ffffff | 0x44000000) : errorColor); String charactersCounterText = getCharactersCounterText(); canvas.drawText(charactersCounterText, isRTL() ? startX : endX - textPaint.measureText(charactersCounterText), lineStartY + bottomSpacing + relativeHeight, textPaint); } @@ -1296,7 +1296,7 @@ protected void onDraw(@NonNull Canvas canvas) { // draw the bottom text if (textLayout != null) { if (tempErrorText != null || ((helperTextAlwaysShown || hasFocus()) && !TextUtils.isEmpty(helperText))) { // error text or helper text - textPaint.setColor(tempErrorText != null ? errorColor : helperTextColor != -1 ? helperTextColor : getCurrentHintTextColor()); + textPaint.setColor(tempErrorText != null ? errorColor : helperTextColor != -1 ? helperTextColor : (baseColor & 0x00ffffff | 0x44000000)); canvas.save(); canvas.translate(startX + getBottomTextLeftOffset(), lineStartY + bottomSpacing - bottomTextPadding); textLayout.draw(canvas); @@ -1308,7 +1308,7 @@ protected void onDraw(@NonNull Canvas canvas) { if (floatingLabelEnabled && !TextUtils.isEmpty(floatingLabelText)) { textPaint.setTextSize(floatingLabelTextSize); // calculate the text color - textPaint.setColor((Integer) focusEvaluator.evaluate(focusFraction, floatingLabelTextColor != -1 ? floatingLabelTextColor : getCurrentHintTextColor(), primaryColor)); + textPaint.setColor((Integer) focusEvaluator.evaluate(focusFraction, floatingLabelTextColor != -1 ? floatingLabelTextColor : (baseColor & 0x00ffffff | 0x44000000), primaryColor)); // calculate the horizontal position float floatingLabelWidth = textPaint.measureText(floatingLabelText.toString()); diff --git a/library/src/main/java/com/rengwuxian/materialedittext/MaterialEditText.java b/library/src/main/java/com/rengwuxian/materialedittext/MaterialEditText.java index e52dfa84..a39a463d 100644 --- a/library/src/main/java/com/rengwuxian/materialedittext/MaterialEditText.java +++ b/library/src/main/java/com/rengwuxian/materialedittext/MaterialEditText.java @@ -1288,7 +1288,7 @@ protected void onDraw(@NonNull Canvas canvas) { // draw the characters counter if ((hasFocus() && hasCharatersCounter()) || !isCharactersCountValid()) { - textPaint.setColor(isCharactersCountValid() ? getCurrentHintTextColor() : errorColor); + textPaint.setColor(isCharactersCountValid() ? (baseColor & 0x00ffffff | 0x44000000) : errorColor); String charactersCounterText = getCharactersCounterText(); canvas.drawText(charactersCounterText, isRTL() ? startX : endX - textPaint.measureText(charactersCounterText), lineStartY + bottomSpacing + relativeHeight, textPaint); } @@ -1296,7 +1296,7 @@ protected void onDraw(@NonNull Canvas canvas) { // draw the bottom text if (textLayout != null) { if (tempErrorText != null || ((helperTextAlwaysShown || hasFocus()) && !TextUtils.isEmpty(helperText))) { // error text or helper text - textPaint.setColor(tempErrorText != null ? errorColor : helperTextColor != -1 ? helperTextColor : getCurrentHintTextColor()); + textPaint.setColor(tempErrorText != null ? errorColor : helperTextColor != -1 ? helperTextColor : (baseColor & 0x00ffffff | 0x44000000)); canvas.save(); canvas.translate(startX + getBottomTextLeftOffset(), lineStartY + bottomSpacing - bottomTextPadding); textLayout.draw(canvas); @@ -1308,7 +1308,7 @@ protected void onDraw(@NonNull Canvas canvas) { if (floatingLabelEnabled && !TextUtils.isEmpty(floatingLabelText)) { textPaint.setTextSize(floatingLabelTextSize); // calculate the text color - textPaint.setColor((Integer) focusEvaluator.evaluate(focusFraction, floatingLabelTextColor != -1 ? floatingLabelTextColor : getCurrentHintTextColor(), primaryColor)); + textPaint.setColor((Integer) focusEvaluator.evaluate(focusFraction, floatingLabelTextColor != -1 ? floatingLabelTextColor : (baseColor & 0x00ffffff | 0x44000000), primaryColor)); // calculate the horizontal position float floatingLabelWidth = textPaint.measureText(floatingLabelText.toString()); diff --git a/library/src/main/java/com/rengwuxian/materialedittext/MaterialMultiAutoCompleteTextView.java b/library/src/main/java/com/rengwuxian/materialedittext/MaterialMultiAutoCompleteTextView.java index 4eb1a848..349d7f7b 100644 --- a/library/src/main/java/com/rengwuxian/materialedittext/MaterialMultiAutoCompleteTextView.java +++ b/library/src/main/java/com/rengwuxian/materialedittext/MaterialMultiAutoCompleteTextView.java @@ -1285,7 +1285,7 @@ protected void onDraw(@NonNull Canvas canvas) { // draw the characters counter if ((hasFocus() && hasCharatersCounter()) || !isCharactersCountValid()) { - textPaint.setColor(isCharactersCountValid() ? getCurrentHintTextColor() : errorColor); + textPaint.setColor(isCharactersCountValid() ? (baseColor & 0x00ffffff | 0x44000000) : errorColor); String charactersCounterText = getCharactersCounterText(); canvas.drawText(charactersCounterText, isRTL() ? startX : endX - textPaint.measureText(charactersCounterText), lineStartY + bottomSpacing + relativeHeight, textPaint); } @@ -1293,7 +1293,7 @@ protected void onDraw(@NonNull Canvas canvas) { // draw the bottom text if (textLayout != null) { if (tempErrorText != null || ((helperTextAlwaysShown || hasFocus()) && !TextUtils.isEmpty(helperText))) { // error text or helper text - textPaint.setColor(tempErrorText != null ? errorColor : helperTextColor != -1 ? helperTextColor : getCurrentHintTextColor()); + textPaint.setColor(tempErrorText != null ? errorColor : helperTextColor != -1 ? helperTextColor : (baseColor & 0x00ffffff | 0x44000000)); canvas.save(); canvas.translate(startX + getBottomTextLeftOffset(), lineStartY + bottomSpacing - bottomTextPadding); textLayout.draw(canvas); @@ -1305,7 +1305,7 @@ protected void onDraw(@NonNull Canvas canvas) { if (floatingLabelEnabled && !TextUtils.isEmpty(floatingLabelText)) { textPaint.setTextSize(floatingLabelTextSize); // calculate the text color - textPaint.setColor((Integer) focusEvaluator.evaluate(focusFraction, floatingLabelTextColor != -1 ? floatingLabelTextColor : getCurrentHintTextColor(), primaryColor)); + textPaint.setColor((Integer) focusEvaluator.evaluate(focusFraction, floatingLabelTextColor != -1 ? floatingLabelTextColor : (baseColor & 0x00ffffff | 0x44000000), primaryColor)); // calculate the horizontal position float floatingLabelWidth = textPaint.measureText(floatingLabelText.toString());