Hope it's not too late, but the code is setError :
if (!mErrorEnabled) { if (TextUtils.isEmpty(error)) {
this means a simple workaround would be:
textinputlayout.setError(" ");
Please keep in mind that this will make the TextView with the error message visible - so the TextInputLayout will be higher even if it is empty
since this goes through a not-so-well-thought-out case of processing an empty request for an error message.
Simon
source share