LayoutAnimation

LayoutAnimation

Automatically animates views to their new positions when the next layout happens.

A common way to use this API is to call it before calling setState.

Note that in order to get this to work on Android you need to set the following flags via UIManager:

UIManager.setLayoutAnimationEnabledExperimental && UIManager.setLayoutAnimationEnabledExperimental(true);

Methods

static configureNext(config, onAnimationDidEnd?)

Schedules an animation to happen on the next layout.

@param config Specifies animation properties:

  • duration in milliseconds
  • create, config for animating in new views (see Anim type)
  • update, config for animating views that have been updated (see Anim type)

@param onAnimationDidEnd Called when the animation finished. Only supported on iOS. @param onError Called on error. Only supported on iOS.

static create(duration, type, creationProp)

Helper for creating a config for configureNext.

static checkConfig(config, location, name)

Properties

Types: CallExpression

Properties: CallExpression

Presets: ObjectExpression

easeInEaseOut: CallExpression

linear: CallExpression

spring: CallExpression

© 2015–2017 Facebook Inc.
Licensed under the Creative Commons Attribution 4.0 International Public License.
https://facebook.github.io/react-native/docs/layoutanimation.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部