How to write style to error text of EditText in android?

前端 未结 7 1810
没有蜡笔的小新
没有蜡笔的小新 2020-11-27 12:37

I\'m trying to write new custom style for my android application. I need to give style to errorText which appears after setting setError in EditText

7条回答
  •  暖寄归人
    2020-11-27 13:05

    I've seen the accepted answer but i don't like the proposed library

    I think this is a bug in the Android framework and I filed a bug here: https://code.google.com/p/android/issues/detail?id=158590

    EDIT: the android design library TextInputLayout widget can be used to obtain a better error handling on EditText.

    See how it looks like here: https://www.youtube.com/watch?v=YnQHb0fNtF8

    And how to implement here: http://code.tutsplus.com/tutorials/creating-a-login-screen-using-textinputlayout--cms-24168

提交回复
热议问题