ketzalv / auto-validation-edittext

This repo contains a little fork of edittext that enable validate caracteristics of forms to a simple edittext

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ValidationEditText hint is not removed when a value is added

agforte opened this issue · comments

  1. add value
  2. leave view
  3. go back to view

--> Hint shows over value

Any idea?

mmm yep it's a TextInputLayout behavior, you have two ways, the easy form is disable the animation for all TextInputLayouts like these:
textInputLayout.setHintAnimationEnabled(false);
or in xml
app:hintAnimationEnabled="false"

the other way is that you should handle the save state of the fragment or activity, when return re set the values on the EditText with this trick:
textInputLayout.setHintAnimationEnabled(false);
textInput.setText("sample");
textInputLayout.setHintAnimationEnabled(true);

Look at this https://stackoverflow.com/questions/31544089/textinputlayout-animation-overlaps-the-text-when-the-text-is-set-programmaticall

Thanks for your comment. We have tried both but it doesn't help. Also it seems the link you posted refers to a bug in the design support library. We are using the material design library version 1.3.0-alpha03.