0
我看到在xml佈局中使用這個語句會自動爲您動畫。我想它添加到我的應用程序,但是當我把它在佈局我想'android:animateLayoutChanges =「true」'還在繼續工作
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/arrow_background"
android:layout_marginTop="7dp"
android:layout_marginBottom="7dp"
android:padding="10dp"
android:animateLayoutChanges="true"
android:visibility="visible"
android:id="@+id/format_help">
然後我改變能見度不見了
view.findViewById(R.id.format_help).setVisibility(View.GONE);
它纔剛剛瞬間消失。我看到的關於這個的信息來自幾年前,所以有人知道這是否仍然有效或如何使其工作?
編輯:此外,我添加了這個聲明無處不在,它仍然無法正常工作。如果它很重要這是在片段/對話框內