0

I wanted to know if there is a way to detect the end of the hint animation on TextInputLayout ?

I created a custom EditText component (see below), and my objective is to display a hint on editText when the hint of TextInputLayout is at the top of the input (when animation is over)

       <android.support.design.widget.TextInputLayout
            android:id="@+id/text_input_layout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:hint="@string/my_text_input_layout_hint">

            <MyTextInputEditText
                android:id="@+id/edit_text"
                android:hint="@string/my_edit_text_hint_to_display_later"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:textSize="18sp"
                android:inputType="text"/>

        </android.support.design.widget.TextInputLayout>

How can I detect the animation end ? Or does anyone know the duration time of this animation ?

I also tried to animate the "apparition" of the hint on editText, but with no success, it seems to work only on textViews with Objectanimation.

Thanks by advance for your help !

Rémi P
  • 421
  • 5
  • 11
  • Tried [this](https://stackoverflow.com/questions/44164170/android-edittext-with-different-floating-label-and-placeholder)? – Shaishav Jul 10 '17 at 08:20
  • Yes I did this at the moment, but it is not perfect, because at the exact moment the focus is on, the text is displayed, even if the animation is not finished, so both hints are visible at the same time in the edittext for about 100ms... It is ok, but not perfect :) – Rémi P Jul 10 '17 at 08:36

0 Answers0