Our last component is a modal view, which will be opened once the user has pressed on the SET PICKUP LOCATION
button on the location pin. We will display the modal and a custom activity indicator, which will use a complex animation setup to continuously rotate in its position:
/** * src/components/ConfirmationModal.js ***/ import React from 'react'; import { Modal, View, Text, Animated, Easing, TouchableOpacity, StyleSheet, } from 'react-native'; export default class ConfirmationModal extends React.Component { componentWillMount() { this._animatedValue = new Animated.Value(0); } cycleAnimation() { Animated.sequence([ Animated.timing(this._animatedValue, { toValue: 100, duration: 1000, easing: Easing.linear, }), Animated.timing(this._animatedValue, { toValue: 0, duration: 0, }), ]).start(() => { this.cycleAnimation(); }); } componentDidMount() { this.cycleAnimation...