-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathNoteScreen.js
259 lines (166 loc) · 9.19 KB
/
NoteScreen.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
import {
SafeAreaView,
Platform,
StyleSheet,
ScrollView,
View,
Text,
StatusBar,
Alert,
TouchableOpacity,
TextInput,
Image,
ImageBackground,
Linking,
FlatList,
Dimensions,
AsyncStorage,
} from 'react-native';
import React, {Component} from 'react';
import Button from 'react-native-button';
const GLOBAL = require('./Global');
import { SafeAreaProvider } from 'react-native-safe-area-context';
import { PulseIndicator } from 'react-native-indicators';
class NoteScreen extends React.Component {
constructor(props) {
super(props);
this.state={
button_one:0,
button_two:0,
button_three:0,
showimage: true,
}
}
onChangeButton1=()=> {
this.setState({ button_one:1 });
this.setState({ button_two:0 });
this.setState({ button_three:0 });
}
onChangeButton2=()=> {
this.setState({ button_one:0 });
this.setState({ button_two:1 });
this.setState({ button_three:0 });
}
onChangeButton3=()=> {
this.setState({ button_one:0 });
this.setState({ button_two:0 });
this.setState({ button_three:1 });
}
render(){
return(
<SafeAreaProvider>
<View style={{backgroundColor:'white'}}>
<View style={{flexDirection:'row',alignItems:'center',justifyContent:'space-between',marginTop:20,width:'90%',marginLeft:'5%'}}>
<Text style={{fontSize:17, fontFamily:'Exo2-SemiBold', color:'#242B37'}}>Instructions:</Text>
<TouchableOpacity style={{marginRight:5}}>
<Image source={require('./note1.png')}
style={{height:22,width:22,resizeMode:'contain'}} />
</TouchableOpacity>
</View>
<Text style={{fontSize:16,fontFamily:'Exo2-Medium',color:'#242B3780',marginTop:10,marginLeft:'5%',width:'90%',textAlign:'left'}}>My note: Preparation set the weight, sit down, grab the handles and make sure your feet are solid on the floor.</Text>
<Text style={{fontSize:16,fontFamily:'Exo2-Medium',color:'#242B3780',marginTop:10,marginLeft:'5%',width:'90%',textAlign:'left'}}>Set the weight, sit down, grab the handles and make sure your feet are solid on the floor.</Text>
<Text style={{fontSize:16,fontFamily:'Exo2-Medium',color:'#242B3780',marginTop:10,marginLeft:'5%',width:'90%',textAlign:'left'}}>Execution exhale and press the handles up until your arms are extened. Lower, while keeping the weight stack in the air for resitance throughout the entire exercise, and repeat.</Text>
<View style={{flexDirection:'row',marginLeft:'5%',width:'90%',alignItems:'center',justifyContent:'space-between',marginTop:25}}>
{ this.state.button_one == 0 && (
<TouchableOpacity style={{flexDirection:'row',height:34,width:'31.5%',backgroundColor:'#16171866',alignItems:'center',borderRadius:6}}
onPress={()=>this.onChangeButton1()}>
<Image source={require('./gallery.png')}
style={{height:16,width:16,resizeMode:'contain',marginLeft:8}} />
<Text style={{fontSize:17,fontFamily:'Exo2-Regular',color:'#FFFFFF',marginLeft:18}}>IMAGE</Text>
</TouchableOpacity>
)}
{ this.state.button_one == 1 && (
<TouchableOpacity style={{flexDirection:'row',height:34,width:'31.5%',backgroundColor:'#161718',alignItems:'center',borderRadius:6}}>
<Image source={require('./gallery.png')}
style={{height:16,width:16,resizeMode:'contain',marginLeft:8}} />
<Text style={{fontSize:17,fontFamily:'Exo2-Regular',color:'#FFFFFF',marginLeft:18}}>IMAGE</Text>
</TouchableOpacity>
)}
{ this.state.button_two == 0 && (
<TouchableOpacity style={{flexDirection:'row',height:34,width:'31.5%',backgroundColor:'#16171866',alignItems:'center',borderRadius:6}}
onPress={()=>this.onChangeButton2()}>
<Image source={require('./youtube2.png')}
style={{height:22,width:16,resizeMode:'contain',marginLeft:8}} />
<Text style={{fontSize:17,fontFamily:'Exo2-Regular',color:'#FFFFFF',marginLeft:18}}>VIDEO</Text>
</TouchableOpacity>
)}
{ this.state.button_two == 1 && (
<TouchableOpacity style={{flexDirection:'row',height:34,width:'31.5%',backgroundColor:'#161718',alignItems:'center',borderRadius:6}}>
<Image source={require('./youtube2.png')}
style={{height:22,width:16,resizeMode:'contain',marginLeft:8}} />
<Text style={{fontSize:17,fontFamily:'Exo2-Regular',color:'#FFFFFF',marginLeft:18}}>VIDEO</Text>
</TouchableOpacity>
)}
{ this.state.button_three == 0 && (
<TouchableOpacity style={{flexDirection:'row',height:34,width:'31.5%',backgroundColor:'#16171866',alignItems:'center',borderRadius:6}}
onPress={()=>{ this.onChangeButton3(); }}>
<Image source={require('./note.png')}
style={{height:17,width:16,resizeMode:'contain',marginLeft:8}} />
<Text style={{fontSize:17,fontFamily:'Exo2-Regular',color:'#FFFFFF',marginLeft:18}}>NOTE</Text>
</TouchableOpacity>
)}
{ this.state.button_three == 1 && (
<TouchableOpacity style={{flexDirection:'row',height:34,width:'31.5%',backgroundColor:'#161718',alignItems:'center',borderRadius:6}}>
<Image source={require('./note.png')}
style={{height:17,width:16,resizeMode:'contain',marginLeft:8}} />
<Text style={{fontSize:17,fontFamily:'Exo2-Regular',color:'#FFFFFF',marginLeft:18}}>NOTE</Text>
</TouchableOpacity>
)}
</View>
<Modal
animationType="slide"
transparent={true}
visible={this.state.modalVisible}
onRequestClose={() => {
// Alert.alert('Modal has been closed.');
this.setModalVisible(!this.state.modalVisible)
}}>
<TouchableOpacity
style={{
flex: 1,
flexDirection: 'column',
justifyContent: 'center',backgroundColor: 'rgba(0, 0, 0, 0.5)',
alignItems: 'center'}}
activeOpacity={1}
onPressOut={() => {this.setModalVisible(false)}}
>
<View style={{
flexDirection: 'column',
justifyContent: 'center',backgroundColor: 'rgba(0, 0, 0, 0.5)',
alignItems: 'center'}}>
<View style={{
width: 300,backgroundColor: 'white',
height: 300}}>
<View style={{width: '95%', margin: 10}}>
<TextInput
style={{fontSize:17,fontFamily:'Exo2-Medium',color:'#242B3766',width:'98%',height:'auto'}}
placeholder="Your text here…"
placeholderTextColor="#242B3766"
keyboardType="numeric"
maxLength={12}
onChangeText={(text) => this.setState({phone: text})}
value={this.state.phone}
/>
<View style={{borderBottomWidth:2,borderColor:'#0000004D',width:'98%',marginTop:'63%'}}>
</View>
<View style={{flexDirection:'row',width:'55%',alignItems:'center',justifyContent:'space-between',marginTop:17,alignSelf:'flex-end',marginRight:6}}>
<Button
style={{fontSize:17,fontFamily:'Exo2-Medium',color:'#242B37'}}>
CANCEL
</Button>
<Button
style={{fontSize:17,fontFamily:'Exo2-Medium',color:'#242B37'}}>
CONFIRM
</Button>
</View>
</View>
</View>
</View>
</TouchableOpacity>
</Modal>
</View>
</SafeAreaProvider>
);
}
}
export default NoteScreen;