EditText error icon and show password missplaced
<p>I have an EditText as password input like this</p>

<pre><code>&lt;android.support.design.widget.TextInputLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"&gt;

            &lt;EditText
                android:id="@+id/password"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="@string/prompt_password"
                android:imeActionId="@+id/login"
                android:imeActionLabel="@string/action_sign_in_short"
                android:imeOptions="actionUnspecified"
                android:inputType="textPassword"
                android:maxLines="1"
                android:singleLine="true" /&gt;

&lt;/android.support.design.widget.TextInputLayout&gt;
</code></pre>

<p>It's working, but when there's an error the error icon shwon twice and it's on top of show password icon.</p>

<p><a href="https://i.stack.imgur.com/cNGHA.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/cNGHA.jpg" alt="error icon missplaced"></a></p>

<p>My validation code to show the error : </p>

<pre><code>if (success) {
    finish();
    startMainActivity();
} else {
         mPasswordView.setError(getString(R.string.error_incorrect_password));
            mPasswordView.requestFocus();
}
</code></pre>