diff options
| author | Andrew <andrew.mihai@mail.utoronto.ca> | 2019-03-28 14:15:00 +0000 |
|---|---|---|
| committer | Andrew <andrew.mihai@mail.utoronto.ca> | 2019-03-28 14:15:00 +0000 |
| commit | dbe1de2f2c0cbcd9669d86535c27ce3acb5a2403 (patch) | |
| tree | 9b07b55d1033228336aa557e63b61d765f8039c7 | |
| parent | a965012728d50a31b0e2e6fc9668581772fd267a (diff) | |
Added a back button to the map pagefeat/20
| -rw-r--r-- | mobile/screens/MapPage.js | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/mobile/screens/MapPage.js b/mobile/screens/MapPage.js index ea3388b..f8e2a79 100644 --- a/mobile/screens/MapPage.js +++ b/mobile/screens/MapPage.js @@ -43,12 +43,15 @@ export default class Form1 extends Component { this.state.markers[0].latlng.longitude, this.state.markers[0].latlng.latitude] }); - }; + }; + moveToGreetingPage = () => { + this.props.navigation.navigate('GreetingPage'); + } render() { return ( <View style={{flex:1,}}> - <View style={{flex:1}}> + <View style={{flex:3}}> <MapView style={{ flex: 1 }} initialRegion={{ @@ -74,6 +77,13 @@ export default class Form1 extends Component { Proceed </Text> </TouchableHighlight> + <TouchableHighlight + style={styles.second_button_container} + onPress={() => { this.moveToGreetingPage() }}> + <Text style={styles.proceed_title}> + Back + </Text> + </TouchableHighlight> </View> ); } @@ -84,6 +94,16 @@ const styles = StyleSheet.create( { width: '100%', flex: 1, position: 'absolute', + bottom:60, + backgroundColor: '#c0392b', + flexDirection: 'row', + justifyContent: 'center', + alignItems: 'stretch' + }, + second_button_container: { + width: '100%', + flex: 1, + position: 'absolute', bottom:0, backgroundColor: '#535c68', flexDirection: 'row', |
