Я пытаюсь сделать мой Модальный слайд вверх и отскакивать при нажатии кнопки, но он не работает, когда я обертываю Modal в компонент Animated.View. Он только скользящий из-за animationType prop, но потом ничего не происходит. Есть идеи?Возможно ли анимировать Модаль с анимированными в Реальном Роде?
//in render() function
<Animated.View
style={{
flex: 1,
transform: [ // `transform` is an ordered array
{ scale: this.state.bounceValue }, // Map `bounceValue` to `scale`
],
}}
>
<Modal
animationType={"slide"}
transparent={true}
visible={this.state.modalVisible}
>
<View style={styles.modalContainer}>
<View style={styles.modalInnerContainer}>
<ListView
dataSource={this.state.dataSource}
renderRow={this.renderRow}
/>
</View>
</View>
</Modal>
</Animated.View>
// onPress function
_onSelectFilter(rowID) {
if (this.state.modalVisible) {
this.state.bounceValue.setValue(2);
Animated.spring(
this.state.bounceValue,
{
toValue: 0.8,
friction: 1,
}
).start();
}
}
Я нашел еще один сторонний модуль, который полностью JS (response-native-modalbox), и он вполне настраиваемый! – damir46