I have an information carousel in a modal. On Ios it loads perfectly and can be opened and closed. On Android it opens perfectly if the initial state is set to true, but when it is closed and reopened the modal fades in slowly and the carousel is not present.
I have tried using the native Modal and a plugin. Using native my close button and hardware back button will not close the modal on android. I am testing on a Galaxy Note 8.
Any help would be greatly appreciated as I have exhausted my efforts to try and get it to operate correctly.
Here is the Modal Code Section.
//MODAL ACTIONS
_openModal = () => {
this.setState({ isModalVisible: true });
console.log(this.state.isModalVisible);
}
_closeModal = () => {
this.setState({ isModalVisible: false });
console.log(this.state.isModalVisible);
}
//RENDER MODAL CONTENT
_renderModalContent() {
return (
<Modal
isVisible={this.state.isModalVisible}
backdropColor={'black'}
backdropOpacity={0.7}
onBackButtonPress={this._closeModal}
>
<View style={styles.modalContainer}>
<PersonalityDisplay
ptData={ptTypes}
opType={this.props.opType}
/>
<View style={styles.closeButton}>
<Button onPress={this._closeModal}>
Close
</Button>
</View>
</View>
</Modal>
)}
renderInfoPanel() {
return (
<Animated.View
style={this.state.position.getLayout()}
{...this.state.panResponder.panHandlers}
>
{this.renderUserInfo()}
{this._renderMatchStamp()}
{this._renderSideIcons()}
{this._renderModalContent()}
</Animated.View>
)
};
render() {
console.log(this.state.isModalVisible)
return (
<View>
{this.renderInfoPanel()}
</View>
);
}
}
Thanks