I wanted to make my hint to not animate if the edit text is empty. If user start typing the hint will move up, but if the edit text is empty, the hint will return into the edit text.
I have tried
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
if(s.length() == 0){
textInputLayout4.setHintAnimationEnabled(false);
} else {
textInputLayout4.setHintAnimationEnabled(true);
}
}
but the hint does not act like how I wanted it to be.