这是我LayoutAnimation.configureNext(CustomLayoutAnimation); 的
var CustomLayoutAnimation = {
duration: 10,
create: {
type: LayoutAnimation.Types.linear,
property: LayoutAnimation.Properties.opacity
},
update: {
type: LayoutAnimation.Types.curveEaseInEaseOut
}
};
Run Code Online (Sandbox Code Playgroud)
在我的构造函数中
constructor(props: Object) {
super(props);
if (Platform.OS === "android") {
UIManager.setLayoutAnimationEnabledExperimental &&
UIManager.setLayoutAnimationEnabledExperimental(true);
}
Run Code Online (Sandbox Code Playgroud)