Android Material Design: Removing Tooltip Animations

I am creating an application with AutoCompleteTextView using amterial design AppCompat . I need to remove the tooltip animation this component has when you click on the box and the tooltip goes up in smooth animation. Is there any way to remove this animation?

My layout:

 <!-- Login progress --> <ProgressBar android:id="@+id/login_progress" style="?android:attr/progressBarStyleLarge" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="8dp" android:visibility="gone" /> <LinearLayout android:id="@+id/login_form" android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:id="@+id/email_login_form" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <android.support.design.widget.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <AutoCompleteTextView android:id="@+id/email" android:layout_width="match_parent" android:layout_height="wrap_content" android:hint="@string/prompt_email" android:inputType="textEmailAddress" android:maxLines="1" android:singleLine="true" android:theme="@style/AutoCompleteTextViewListasVipHolo" /> </android.support.design.widget.TextInputLayout> <android.support.design.widget.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content"> <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" /> </android.support.design.widget.TextInputLayout> <Button android:id="@+id/email_sign_in_button" style="?android:textAppearanceSmall" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="16dp" android:text="@string/action_sign_in" android:textStyle="bold" /> <Button android:id="@+id/register_button" style="?android:textAppearanceSmall" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="16dp" android:text="@string/action_register" android:textStyle="bold" /> </LinearLayout> </LinearLayout> 

code>

I do not want to lose the auto complete function.

+6
source share
1 answer

If you want to remove the floating label, remove the TextInputLayout wrapper around your AutoCompleteTextView . This will remove the floating label function.

If you need a floating label, but disable animation, then using the v23 support design library you can use textInputLayout.setHintAnimationEnabled(false); in your code

or app:hintAnimationEnabled="true" as the TextInputLayout parameter in XML.

+4
source

All Articles