我有以下的布局片段:
<LinearLayout
android:id="@+id/tagContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:animateLayoutChanges="true" >
</LinearLayout>
<TextView
android:id="@+id/commentLabel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tagContainer" />
如您所见,animateLayoutChanges
在 LinearLayout
上设置为 true
,因此当添加项目时,它会动画显示添加效果。这很好,但在删除项目时存在问题。如果我删除一个项目,动画仍然正常播放,但下面的 TextView
会立即弹出,而不是等待动画完成。我该如何实现这一点,甚至更好的是,使 TextView
动画上升与 LinearLayout
动画同步进行?