Is it necessary to call
setErrorEnable(false)? Why? I don’t see the difference but I see many people do that.
There is no need to call both of them. When you set an error for a TextInputLayout at the first time, it’s height increase a little under it’s EditText field for showing that error.
If you use
setError(null) just the error text will delete, but if you use
setErrorEnable(false) both error text and extra space will delete(note that if you have set a helper for TextInputLayout, the error simply replace with the helper text and doesn’t add an extra space so you don’t see any difference between this two methods).