fixed issues #4395 & #4343 (#4423)

* fixed issues #4395 & #4343

Signed-off-by: Satvik Kushwaha <59243339+satvik2131@users.noreply.github.com>
This commit is contained in:
Satvik Kushwaha 2023-02-12 03:19:45 +05:30 committed by GitHub
parent 694463cf5a
commit f0381d4e63
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -30,4 +30,4 @@
android:padding="@dimen/margin_half"
android:src="@drawable/ic_close"
app:tint="@color/base_red" />
</LinearLayout>
</LinearLayout>

View file

@ -332,7 +332,8 @@ public final class UiUtils
public static void setInputError(@NonNull TextInputLayout layout, @StringRes int error)
{
layout.setError(error == 0 ? null : layout.getContext().getString(error));
layout.getEditText().setError(error == 0 ? null : layout.getContext().getString(error));
layout.getEditText().setTextColor(error == 0 ? ThemeUtils.getColor(layout.getContext(), android.R.attr.textColorPrimary)
: layout.getContext().getResources().getColor(R.color.base_red));
}