I have several error messages in an Android Studio app using Java and I cannot figure out how to customize their appearance. I have consulted several answers on this site but none of them have worked for what I want.
This is what the error message looks like.
I want to change the colors of the black background, the white text, and the red line and icon.
This is the code for the error message,
String email = editTextEmail.getText().toString().trim();
String password = editTextPassword.getText().toString().trim();
if(email.isEmpty()){
editTextEmail.setError("Please enter an email.");
editTextEmail.requestFocus();
return;
}
and this is the code for the editText object.
<EditText
android:id="@+id/login_email"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:gravity="center"
android:hint="Email"
android:padding="8dp"
android:drawableLeft="@drawable/email_icon"
android:textColor="#417577"
android:textSize="25dp" />
How do I change the colors displayed in the error message? Also, is there a way to set these color changes for the whole app and not just individually?
Thank you!