Commit dffb9bfd authored by Libin Lu's avatar Libin Lu

update example

parent 0e4aca82
...@@ -11,7 +11,8 @@ import { ...@@ -11,7 +11,8 @@ import {
TouchableOpacity, TouchableOpacity,
View, View,
Clipboard, Clipboard,
Platform Platform,
ScrollView
} from 'react-native'; } from 'react-native';
import { StackNavigator } from 'react-navigation'; import { StackNavigator } from 'react-navigation';
...@@ -182,6 +183,7 @@ class MainPage extends Component { ...@@ -182,6 +183,7 @@ class MainPage extends Component {
return ( return (
<View style={styles.container}> <View style={styles.container}>
<ScrollView style={{paddingHorizontal: 20}}>
<Text style={styles.welcome}> <Text style={styles.welcome}>
Welcome to Simple Fcm Client! Welcome to Simple Fcm Client!
</Text> </Text>
...@@ -214,14 +216,20 @@ class MainPage extends Component { ...@@ -214,14 +216,20 @@ class MainPage extends Component {
<Text style={styles.buttonText}>Schedule Notification in 5s</Text> <Text style={styles.buttonText}>Schedule Notification in 5s</Text>
</TouchableOpacity> </TouchableOpacity>
<Text style={styles.instructions}>
Init notif:
</Text>
<Text> <Text>
Init notif: {JSON.stringify(this.state.initNotif)} {JSON.stringify(this.state.initNotif)}
</Text> </Text>
<Text selectable={true} onPress={() => this.setClipboardContent(this.state.token)} style={styles.instructions}> <Text style={styles.instructions}>
Token: {this.state.token} Token:
</Text> </Text>
<Text selectable={true} onPress={() => this.setClipboardContent(this.state.token)}>
{this.state.token}
</Text>
</ScrollView>
</View> </View>
); );
} }
...@@ -281,8 +289,8 @@ const styles = StyleSheet.create({ ...@@ -281,8 +289,8 @@ const styles = StyleSheet.create({
button: { button: {
backgroundColor: "teal", backgroundColor: "teal",
paddingHorizontal: 20, paddingHorizontal: 20,
paddingVertical: 10, paddingVertical: 15,
marginVertical: 15, marginVertical: 10,
borderRadius: 10 borderRadius: 10
}, },
buttonText: { buttonText: {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment