Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Trick to change text color inside setError method of EditText?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 3.10k
    Comment on it

    If you want to customized the error message of EditText than you can simply use the code given below.

    Using below code you can declare your edit text

    // Declare your edit-text.
    EditText editText=(EditText)view.findViewById(R.id.editText);
    

    The below code will help you to set the font color of your edit text.

    // set color of the edittext using HTML.
    editText.setError(Html.fromHtml("<font color="#000000">"error!"</font>"));
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: