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

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 
  } 
} 


评论关闭
IT序号网

微信公众号号:IT虾米 (左侧二维码扫一扫)欢迎添加!