Skip to content

Instantly share code, notes, and snippets.

@Jpoliachik
Last active January 31, 2016 21:40
Show Gist options
  • Save Jpoliachik/2e7efa831be11fe89a1d to your computer and use it in GitHub Desktop.
Save Jpoliachik/2e7efa831be11fe89a1d to your computer and use it in GitHub Desktop.
LayoutAnimation Custom Example
// 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