SchoolAge.js 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. /**
  2. * Sample React Native App
  3. * https://github.com/facebook/react-native
  4. *
  5. * @format
  6. * @flow
  7. */
  8. import React, { Component } from "react";
  9. import {
  10. Platform,
  11. StyleSheet,
  12. Text,
  13. View,
  14. Image,
  15. TouchableOpacity,
  16. ImageBackground,
  17. Button,
  18. DeviceEventEmitter
  19. } from "react-native";
  20. import AndroidUtil from "../../util/AndroidUtil";
  21. import BasePage from "../BasePage";
  22. type Props = {};
  23. export default class SchoolAge extends BasePage {
  24. render() {
  25. return (
  26. <ImageBackground
  27. source={{
  28. uri:
  29. "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1556277324856&di=dc1548a0c5ba10481af922e174912937&imgtype=0&src=http%3A%2F%2Fwww.51pptmoban.com%2Fd%2Ffile%2F2012%2F05%2F12%2F82c4568a90055adcf8fbb896f0841c69.jpg"
  30. }}
  31. style={{
  32. flex: 1,
  33. width: "100%",
  34. height: "100%"
  35. }}
  36. >
  37. <Text style={styles.title_text}>请选择孩子所在的学龄段</Text>
  38. <View
  39. style={{
  40. flex: 1,
  41. flexDirection: "column",
  42. justifyContent: "center",
  43. alignItems: "stretch"
  44. }}
  45. >
  46. <View
  47. style={{
  48. flex: 1,
  49. flexDirection: "row"
  50. }}
  51. >
  52. <View style={{ flex: 1 }} />
  53. <TouchableOpacity
  54. activeOpacity={1}
  55. style={{
  56. flex: 3,
  57. width: 300,
  58. height: 150
  59. }}
  60. onPress={() => this.toNextPage("MainActivity")}
  61. >
  62. <Image
  63. source={{
  64. uri:
  65. "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1556275628062&di=ee191e8dccb7132ad39f2f11b0fb1161&imgtype=0&src=http%3A%2F%2Fc61.cnki.net%2FCJFD%2Fbig%2FXQYJ%2FXQYJ199609.jpg"
  66. }}
  67. style={{
  68. width: 300,
  69. height: 150,
  70. borderRadius: 50
  71. }}
  72. />
  73. </TouchableOpacity>
  74. <View style={{ flex: 1 }} />
  75. </View>
  76. <View
  77. style={{
  78. flex: 1,
  79. flexDirection: "row"
  80. }}
  81. >
  82. <View style={{ flex: 1 }} />
  83. <TouchableOpacity
  84. activeOpacity={1}
  85. style={{
  86. flex: 3,
  87. width: 300,
  88. height: 150
  89. }}
  90. onPress={() => this.toNextPage("MainPage")}
  91. >
  92. <Image
  93. source={{
  94. uri:
  95. "https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=532481250,2026274152&fm=15&gp=0.jpg"
  96. }}
  97. style={{
  98. flex: 3,
  99. width: 300,
  100. height: 150,
  101. borderRadius: 50
  102. }}
  103. />
  104. </TouchableOpacity>
  105. <View style={{ flex: 1 }} />
  106. </View>
  107. <View
  108. style={{
  109. flex: 1,
  110. flexDirection: "row"
  111. }}
  112. >
  113. <View style={{ flex: 1 }} />
  114. <Image
  115. source={{
  116. uri:
  117. "https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1295208965,3056573814&fm=26&gp=0.jpg"
  118. }}
  119. style={{
  120. flex: 3,
  121. width: 300,
  122. height: 150,
  123. borderRadius: 50
  124. }}
  125. />
  126. <View style={{ flex: 1 }} />
  127. </View>
  128. </View>
  129. </ImageBackground>
  130. );
  131. }
  132. }
  133. const styles = StyleSheet.create({
  134. title_text: {
  135. justifyContent: "center",
  136. alignItems: "center",
  137. color: "red",
  138. fontSize: 30,
  139. textAlign: "center",
  140. marginTop: 30,
  141. marginBottom: 50
  142. }
  143. });