-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGirl.js
More file actions
55 lines (53 loc) · 1.57 KB
/
Girl.js
File metadata and controls
55 lines (53 loc) · 1.57 KB
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
/**
* Created by penn on 2016/12/14.
*/
import React, {Component} from 'react';
import {
View,
StyleSheet,
Text,
TouchableOpacity,
Image,
} from 'react-native'
import NavigationBar from './js/common/NavigationBar'
export default class Girl extends Component {
renderButton(image){
return <TouchableOpacity
style={{padding: 8}}
onPress={()=>{
this.props.navigator.pop();
}}>
<Image
style={{width: 26, height: 26,tintColor:'yellow'}}
source={image}/>
</TouchableOpacity>;
}
render() {
return (
<View style={styles.container}>
<NavigationBar
title='Girl'
style={{backgroundColor:'#F08080'}}
leftButton={this.renderButton(require('./res/images/ic_arrow_back_white_36pt.png'))}
rightButton={this.renderButton(require('./res/images/ic_star.png'))}
/>
<Text style={styles.tips}>I am girl.</Text>
<Text style={styles.tips}>我收到了男孩送的:{this.props.what}</Text>
<Text style={styles.tips} onPress={()=> {
this.props.onCallback('巧克力');
this.props.navigator.pop();
}}>
回赠,男孩巧克力
</Text>
</View>)
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor:'white'
},
tips: {
fontSize: 18
}
})