Last active
January 31, 2016 21:40
-
-
Save Jpoliachik/2e7efa831be11fe89a1d to your computer and use it in GitHub Desktop.
LayoutAnimation Custom Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Spring | |
var CustomLayoutSpring = { | |
duration: 400, | |
create: { | |
type: LayoutAnimation.Types.spring, | |
property: LayoutAnimation.Properties.scaleXY, | |
springDamping: 0.7, | |
}, | |
update: { | |
type: LayoutAnimation.Types.spring, | |
springDamping: 0.7, | |
}, | |
}; | |
// Linear with easing | |
var CustomLayoutLinear = { | |
duration: 200, | |
create: { | |
type: LayoutAnimation.Types.linear, | |
property: LayoutAnimation.Properties.opacity, | |
}, | |
update: { | |
type: LayoutAnimation.Types.curveEaseInEaseOut, | |
}, | |
}; | |
// Execute by calling before a state change | |
// LayoutAnimation.configureNext(CustomLayoutSpring); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment