【问题标题】:Merge remaining views with animation after deleting one of the view删除视图之一后将剩余视图与动画合并
【发布时间】:2014-05-15 11:19:01
【问题描述】:

我有 4 个视图的线性布局。我滑动并删除第二个位置的视图。现在我希望第 3 个位置的视图与第 1 个位置的视图与动画合并。这是示例代码: LinearLayout temp = (LinearLayout) findViewById(R.id.linear); temp.removeViewAt(2);

通过在视图被移除后立即执行此操作,剩余的视图会在没有动画的情况下相互连接。我希望它加入他们的动画。

请帮忙。谢谢

【问题讨论】:

    标签: android android-layout android-animation


    【解决方案1】:

    将 android:animateLayoutChanges 属性设置为 true。

    http://developer.android.com/training/animation/layout.html

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多