反应本机布局动画自定义预设



我们有这样的预定义预设。

LayoutAnimation.configureNext(LayoutAnimation.Presets.linear);

但是我没有找到使用我的自定义预设的方法,例如线性类型和 0.1s 速度。

你可以像这样使用它:

LayoutAnimation.configureNext(CustomAnimation)

var CustomAnimation = {
  duration: 400,
  create: {
    type: LayoutAnimation.Types.spring,
    property: LayoutAnimation.Properties.scaleXY,
    springDamping: 0.7
  },
  update: {
    type: LayoutAnimation.Types.spring,
    springDamping: 0.7
  }
}

最新更新