TextInputLayout.setError() leaves empty space after clearing the error

前端 未结 10 1556
囚心锁ツ
囚心锁ツ 2020-12-08 09:24

I recently used TextInputLayout and it\'s setError() method. The problem I\'m getting is, when I clear the error by calling setError(null)

10条回答
  •  被撕碎了的回忆
    2020-12-08 09:37

    This is extension in kotlin solving problem:

    fun TextInputLayout.clearError() {
        error = null
        isErrorEnabled = false
    }
    

提交回复
热议问题