Skip to content

Commit 5ce4d00

Browse files
Merge pull request #2 from LucasFaiska/master
Ajuste para o texto ter a mesma cor do hint de erro.
2 parents 22158c0 + c3e3f18 commit 5ce4d00

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

library/src/main/java/com/rengwuxian/materialedittext/MaterialEditText.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1333,6 +1333,7 @@ protected void onDraw(@NonNull Canvas canvas) {
13331333
if (!hideUnderline) {
13341334
lineStartY += bottomSpacing;
13351335
if (!isInternalValid()) { // not valid
1336+
setTextColor(errorColor);
13361337
paint.setColor(errorColor);
13371338
canvas.drawRect(startX, lineStartY, endX, lineStartY + getPixel(2), paint);
13381339
} else if (!isEnabled()) { // disabled
@@ -1352,9 +1353,11 @@ protected void onDraw(@NonNull Canvas canvas) {
13521353
canvas.drawRect(startX, lineStartY, endX, lineStartY + getPixel(1), paint);
13531354
}
13541355
} else if (hasFocus()) { // focused
1356+
resetTextColor();
13551357
paint.setColor(primaryColor);
13561358
canvas.drawRect(startX, lineStartY, endX, lineStartY + getPixel(2), paint);
13571359
} else { // normal
1360+
resetTextColor();
13581361
paint.setColor(underlineColor != -1 ? underlineColor : baseColor & 0x00ffffff | 0x1E000000);
13591362
canvas.drawRect(startX, lineStartY, endX, lineStartY + getPixel(1), paint);
13601363
}

0 commit comments

Comments
 (0)