title: Using onFocusChange in TextInputLayout messes up hints
body: <p>I am trying to do a validation + warning when a user leaves a field.</p>
  
  <p>I am using textInputLayout + TextInputEditText and listening on onFocusChanged - pretty basic :-)</p>
  
  <p>My problem is that the hint stays in the top when I use the onFocusChangeListener and I want it to act normal and go to the editText field.</p>
  
  <p>Any ideas?</p>
  
  <p>XML</p>
  
  <pre><code>   &lt;android.support.design.widget.TextInputLayout
          android:id="@+id/usernameWrapper"
          errorEnabled="true"
          android:layout_marginBottom="12dp"
          android:layout_width="match_parent"
          android:layout_height="wrap_content" &gt;
  
          &lt;android.support.design.widget.TextInputEditText
              android:id="@+id/username"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:enabled="true"
              android:hint="@string/login_name_hint"
              android:inputType="textEmailAddress" /&gt;
  
      &lt;/android.support.design.widget.TextInputLayout&gt;
  </code></pre>
  
  <p>Code</p>
  
  <pre><code>findViewById(R.id.username).setOnFocusChangeListener(new 
         View.OnFocusChangeListener() {
              @Override
              public void onFocusChange(View view, boolean hasFocus) {
                  if (!hasFocus) {
                      setUsernameError("Indtast e-mail (eller brugernavn)");
                  }
              }
          });
  </code></pre>
  
  <h2><strong>Edit:</strong></h2>
  
  <p><strong>To clarify:</strong> The problem occurs when I leave the EditText. Then I expect the hint to move from label to EditText. It does not. It stays in the label. This only occurs when I set an onFocusChangeListener on the EditText</p>