在密码类型字段上使用时,EditText setError 上的双感叹号

Double exclamation mark on EditText setError when used on a password type field

在我的应用程序中,我使用设计支持库的 TextInputLayout 围绕我所有需要提示标签效果的 EditText。但是我注意到这样做的不利影响 - 将它应用于密码字段将使 setError 方法应用两个感叹号:一个在 EditText 的中间,一个在适当的位置,稍微覆盖 "eye" (密码可见性)图标。

这仅发生在将 inputType 设置为 textPassword 的字段上。

我该如何解决这个问题?

编辑:

XML布局

<android.support.design.widget.TextInputLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content">
     <EditText
        android:id="@+id/loginEmail"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="@string/hint_email"
        android:inputType="textEmailAddress"/>            
</android.support.design.widget.TextInputLayout>

<android.support.design.widget.TextInputLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content">
    <EditText
        android:id="@+id/loginPassword"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="@string/hint_password"
        android:inputType="textPassword"/>
</android.support.design.widget.TextInputLayout>

尝试为 TextInputLayout 设置错误消息并将其从 editText 对象中删除。