Advertisement
Sw6

Untitled

Sw6
Feb 16th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.73 KB | None | 0 0
  1. import React from 'react';
  2. import { StyleSheet, Text, View, TextInput, Button, Image, TouchableOpacity } from 'react-native';
  3. import { createStackNavigator, createAppContainer } from "react-navigation";
  4. import { Container, Header, Content, Accordion } from "native-base";
  5.  
  6.  
  7.  
  8. class HomeScreen extends React.Component {
  9. static navigationOptions = {
  10. title: 'English',
  11. };
  12.  
  13. render() {
  14. return (
  15. <View style={{ width: '100%', hieght: '100%' }}>
  16.  
  17.  
  18. <View style={styles.ShadowTop} />
  19.  
  20.  
  21.  
  22.  
  23. <View style={styles.circle}>
  24. <Text style={styles.ArabicText}>
  25. {' مرحبا , "اسم البرنامج" \n \n هو برنامج يساعدك على تعلم اللغة الانقليزية بطريقة مبسطة وترفيهية ويساعدك على تنمية مهاراتك واكتساب بعض المهارات الجديده \n نتمنى لك وقتا سعيدا.'}
  26. </Text>
  27. </View>
  28.  
  29. <View style={styles.ViewButton}>
  30. <TouchableOpacity
  31. style={styles.buttonOne}
  32. onPress={ ()=> {this.props.navigation.navigate('Grammer')} }>
  33. <Text style={styles.ButtonText}>القواعد</Text>
  34. </TouchableOpacity>
  35. </View>
  36.  
  37.  
  38. <View style={styles.ViewButton}>
  39. <TouchableOpacity
  40. style={styles.buttonTwo}
  41. onPress={ ()=> {this.props.navigation.navigate('Quests')} }
  42. >
  43. <Text
  44. style={styles.ButtonText}> الاسئلة</Text>
  45. </TouchableOpacity>
  46. </View>
  47.  
  48.  
  49. <View style={styles.ViewButton}>
  50. <TouchableOpacity
  51. style={styles.buttonOne}
  52. onPress={ ()=> {this.props.navigation.navigate('Details')} }>
  53. <Text style={styles.ButtonText}>عن البرنامج</Text>
  54. </TouchableOpacity>
  55. </View>
  56.  
  57.  
  58.  
  59. <Text style={styles.Text}>
  60. Made with love in Alsiddeq labs
  61. </Text>
  62.  
  63.  
  64. </View>
  65. );
  66. }
  67. }
  68.  
  69.  
  70. class DetailsScreen extends React.Component {
  71. static navigationOptions = {
  72. title: 'عن البرنامج',
  73. };
  74.  
  75. render() {
  76. return (
  77. <View style={{ width: '100%', hieght: '100%', alignItems: 'canter' }}>
  78. <Text
  79. style={
  80. {
  81. color: '#a8a8a8',
  82. marginTop: '2%',
  83. alignSelf: 'center',
  84. fontSize: 20
  85. }
  86. }
  87. >
  88.  
  89. عن البرنامج
  90.  
  91. </Text>
  92. </View>
  93. );
  94. }
  95. }
  96.  
  97.  
  98.  
  99.  
  100. class Quests extends React.Component {
  101. static navigationOptions = {
  102. title: 'الاسئلة',
  103. };
  104.  
  105. render() {
  106. return (
  107. <View style={{ width: '100%', hieght: '100%', alignItems: 'canter' }}>
  108. <Text
  109. style={
  110. {
  111. color: 'black',
  112. marginTop: '2%',
  113. marginBottom: '5%',
  114. alignSelf: 'center',
  115. fontSize: 23
  116. }
  117. }
  118. >
  119.  
  120. ' Yasser ......... to school every day. ' ( Present simple )
  121.  
  122. </Text>
  123.  
  124.  
  125. <View style={{ alignSelf: 'center' }}>
  126. <TouchableOpacity
  127. style={styles.QuestButton}
  128. onPress={ ()=> {alert('اجابة صحيحة')} }>
  129. <Text style={styles.ButtonText}>Goes</Text>
  130. </TouchableOpacity>
  131. </View>
  132.  
  133. <View style={{ alignSelf: 'center' }}>
  134. <TouchableOpacity
  135. style={styles.QuestButton }
  136. onPress={ ()=> {alert('اجابة خاطئة')} }>
  137. <Text style={styles.ButtonText}>Didn't</Text>
  138. </TouchableOpacity>
  139. </View>
  140.  
  141. <View style={{ alignSelf: 'center' }}>
  142. <TouchableOpacity
  143. style={styles.QuestButton}
  144. onPress={ ()=> {alert('اجابة خاطئة')} }>
  145. <Text style={styles.ButtonText}>Go</Text>
  146. </TouchableOpacity>
  147. </View>
  148.  
  149. <View style={{ alignSelf: 'center' }}>
  150. <TouchableOpacity
  151. style={styles.QuestButton}
  152. onPress={ ()=> {alert('اجابة خاطئة')} }>
  153. <Text style={styles.ButtonText}>Went</Text>
  154. </TouchableOpacity>
  155. </View>
  156.  
  157.  
  158. </View>
  159. );
  160. }
  161. }
  162.  
  163.  
  164.  
  165.  
  166. const dataArray = [
  167. { title: "Present simple", content: "الاستخدامات : - للتحدث عن الروتين اليومي - للتحدث عن الحقائق العلمية" },
  168. { title: "'القاعده 2'", content: " -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --" },
  169. { title: "'القاعده 3'", content: " -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --" },
  170. { title: "'القاعده 4'", content: " -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --" },
  171. { title: "'القاعده 5'", content: " -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --" },
  172.  
  173.  
  174. ];
  175.  
  176. class Grammer extends React.Component {
  177. static navigationOptions = {
  178. title: 'القواعد',
  179. };
  180.  
  181. render() {
  182. return (
  183. <Container>
  184. <Content padder>
  185. <Accordion
  186. dataArray={dataArray}
  187. icon="add"
  188. //expandedIcon="remove"
  189. iconStyle={{ color: "green" }}
  190. expandedIconStyle={{ color: "red" }}
  191. />
  192. </Content>
  193. </Container>
  194. );
  195. }
  196. }
  197.  
  198.  
  199. const styles = StyleSheet.create({
  200. Header: {
  201. backgroundColor: '#91e2f2',
  202. alignItems: 'center',
  203. justifyContent: 'center',
  204. height: 80,
  205. },
  206.  
  207. HeaderText: {
  208. fontSize: 25,
  209. color: '#383838'
  210. },
  211.  
  212. ShadowTop: {
  213. height: 5,
  214. backgroundColor: '#e5e5e5',
  215. opacity: 10
  216. },
  217.  
  218. circle: {
  219. borderRadius: 100/2,
  220. backgroundColor: '#fff',
  221. alignItems: 'center',
  222. borderWidth: 2,
  223. borderColor: '#a8a8a8',
  224.  
  225. // Position&d //
  226.  
  227. width: '93%',
  228. height: 250,
  229. marginTop: '4%',
  230. marginRight: '3%',
  231. marginLeft: '3%',
  232. },
  233.  
  234. ArabicText: {
  235. color: '#383838',
  236. margin: '3%',
  237. fontSize: 23,
  238. writingDirection: 'rtl'
  239. },
  240. Top: {
  241. height: 23,
  242. backgroundColor: '#898989',
  243. //backgroundColor: 'black',
  244. opacity: 10
  245. },
  246.  
  247. ViewButton: {
  248. margin: 20,
  249. marginLeft: '4%',
  250. },
  251.  
  252. buttonOne: {
  253. backgroundColor: '#fff',
  254. borderRadius: 100/2,
  255. alignItems: 'center',
  256. marginRight: '30%',
  257. width: '60%',
  258. height: 50,
  259. borderWidth: 2,
  260. borderColor: '#a8a8a8',
  261.  
  262. },
  263.  
  264.  
  265. QuestButton: {
  266. backgroundColor: '#fff',
  267. borderRadius: 100/2,
  268. alignItems: 'center',
  269. //marginRight: '30%',
  270. width: 200,
  271. height: 50,
  272. borderWidth: 2,
  273. borderColor: '#a8a8a8',
  274.  
  275. },
  276.  
  277. ButtonText: {
  278. fontSize: 20,
  279. color: '#383838',
  280. marginTop: 10
  281. },
  282.  
  283. buttonTwo: {
  284. backgroundColor: '#fff',
  285. borderRadius: 100/2,
  286. alignItems: 'center',
  287. marginLeft: '40%',
  288. width: '60%',
  289. height: 50,
  290. borderWidth: 2,
  291. borderColor: '#a8a8a8',
  292.  
  293.  
  294. },
  295.  
  296. BottomText: {
  297. fontSize: 20,
  298. color: '#383838'
  299. },
  300.  
  301. Down: {
  302. backgroundColor: '#91e2f2',
  303. alignItems: 'center',
  304. height: 80,
  305. width: '100%',
  306. flexDirection: 'row',
  307. justifyContent: 'center',
  308. marginBottom: '0%',
  309. },
  310.  
  311. ShadowDown: {
  312. marginTop: '5%',
  313. height: 5,
  314. backgroundColor: '#e5e5e5',
  315. opacity: 10,
  316. },
  317.  
  318. Text: {
  319. fontSize: 20,
  320. color: '#a8a8a8',
  321. marginTop: '5%',
  322. alignSelf: 'center',
  323. marginBottom: 10
  324. }
  325.  
  326. });
  327.  
  328. const AppNavigator = createStackNavigator({
  329. Home: {
  330. screen: HomeScreen,
  331. },
  332. Details: {
  333. screen: DetailsScreen,
  334. },
  335. Grammer: {
  336. screen: Grammer
  337. },
  338. Quests: {
  339. screen: Quests
  340. },
  341. }, {
  342. initialRouteName: 'Home',
  343. });
  344.  
  345.  
  346. export default AppContainer = createAppContainer(AppNavigator);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement