This repository has been archived by the owner on Sep 11, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathApp3.js
71 lines (61 loc) · 2.09 KB
/
App3.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
import React, { Component } from 'react';
import {
StyleSheet,
Button,
Image,
View,
Text,
Navigator,
TouchableHighlight,
TouchableOpacity,
DrawerLayoutAndroid,
ScrollView,
ListView,
FlatList
} from 'react-native';
import {
StackNavigator,
} from 'react-navigation';
import Mapa from './mapa/AppMapa';
import Home from './login/AppHome';
import Config from './login/AppConfig'
import Logout from './login/AppLogin';
import Login from './login/AppLogin';
import App from './App';
class App3 extends Component {
constructor(props) {
super(props);
this.openDrawer = this.openDrawer.bind(this);
}
openDrawer() {
this.drawer.openDrawer();
}
render() {
var navigationView = (
<View style={{flex: 1, backgroundColor: '#fff'}}>
<Button title="Mapa" onPress={() => {this.props.navigation.navigate('Mapa')}} style={{margin: 10, fontSize: 15, textAlign: 'left', backgroundColor: '#fff'}} />
<Button title="Configuração" style={{margin: 10, fontSize: 15, textAlign: 'left'}} />
<Button title="Sair" style={{margin: 10, fontSize: 15, textAlign: 'left'}} />
</View>
);
return (
<DrawerLayoutAndroid
drawerWidth={300}
ref={(_drawer) => this.drawer = _drawer}
drawerPosition={DrawerLayoutAndroid.positions.Left}
renderNavigationView={() => navigationView}>
<View style={{flex: 1, textAlign: 'right'}}>
<TouchableHighlight onPress={this.openDrawer} style={{backgroundColor: '#000000'}}>
<Image source={require('./menu-icon.png')} style={{margin: 10, width: 30, height: 30}} />
</TouchableHighlight>
</View>
</DrawerLayoutAndroid>
);
}
}
export default App3;