-
Notifications
You must be signed in to change notification settings - Fork 28
/
index.android.js
75 lines (69 loc) · 1.44 KB
/
index.android.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
70
71
72
73
74
75
/**
* Sample React Native App
* https://github.com/facebook/react-native
*/
import React, {
AppRegistry,
Component,
StyleSheet,
StatusBar,
Text,
ToolbarAndroid,
View
} from 'react-native';
import ActionButton from 'react-native-action-button';
class ReactNativeSample extends Component {
render() {
return (
<View style={styles.container}>
<StatusBar
animated={true}
backgroundColor="#4F6A77"
/>
<ToolbarAndroid
title="QR Code Scanner"
titleColor="#ffffff"
navIcon={require("./icons/ic_dehaze_white_24dp.png")}
style={styles.toolbar}
/>
<Text style={styles.welcome}>
Welcome to React Native
</Text>
<ActionButton
buttonColor="rgba(231,76,60,1)"
onPress={() => { console.log("hi")}}
/>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#ffffff',
},
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
instructions: {
textAlign: 'center',
color: '#333333',
marginBottom: 5,
},
toolbar: {
backgroundColor: '#607d8b',
height: 56,
},
floatingIcon: {
width: 60,
height: 60,
borderRadius: 30,
backgroundColor: '#ee6e73',
position: 'absolute',
bottom: 10,
right: 10,
}
});
AppRegistry.registerComponent('ReactNativeSample', () => ReactNativeSample);