PassMode1.js 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. import React, { Component } from "react"
  2. import { StyleSheet, Text, View, TouchableOpacity } from "react-native"
  3. import { unitWidth, unitHeight } from "../utils/AdapterUtil";
  4. export default class PassMode1 extends Component {
  5. toPassmode = () => {
  6. const { navigation } = this.props;
  7. navigation.navigate("PassMode")
  8. }
  9. render() {
  10. return (
  11. <View style={styles.container}>
  12. <View style={styles.topArea}>
  13. <View style={styles.tit}>
  14. <Text style={styles.titText}>第一关</Text>
  15. </View>
  16. <Text style={{ fontSize: unitWidth * 28, color: "#666666" }}>你会选择你爱的人还是爱你的人你会选择你爱的人还是爱你的人你会选择你爱的人还是爱你的人你会选择你爱的人还是爱你的人你会选择你爱的人还是爱你的人你会选择你爱的人还是爱你的人你会选择你爱的人还是爱你的人</Text>
  17. </View>
  18. <View style={styles.btnList}>
  19. <View style={styles.btnItem}>
  20. <View style={styles.btnItemLeft}>
  21. <Text style={{ fontSize: unitWidth * 60, color: "#FFE1EE" }}>A</Text>
  22. </View>
  23. <View style={styles.btnItemRight}>
  24. <Text style={{ fontSize: unitWidth * 28, color: "#666666" }}>XXXXXXXXXXXXXXXXXXXXXXXXXXXX</Text>
  25. </View>
  26. </View>
  27. <TouchableOpacity onPress={this.toPassmode}>
  28. <View style={styles.btnItemRed}>
  29. <View style={styles.btnItemLeft}>
  30. <Text style={{ fontSize: unitWidth * 60, color: "#FFE1EE" }}>B</Text>
  31. </View>
  32. <View style={styles.btnItemRight}>
  33. <Text style={{ fontSize: unitWidth * 28, color: "#666666" }}>XXXXXXXXXXXXXXXXXXXXXXXXXXXX</Text>
  34. </View>
  35. </View>
  36. </TouchableOpacity>
  37. <View style={styles.btnItem}>
  38. <View style={styles.btnItemLeft}>
  39. <Text style={{ fontSize: unitWidth * 60, color: "#FFE1EE" }}>C</Text>
  40. </View>
  41. <View style={styles.btnItemRight}>
  42. <Text style={{ fontSize: unitWidth * 28, color: "#666666" }}>XXXXXXXXXXXXXXXXXXXXXXXXXXXX</Text>
  43. </View>
  44. </View>
  45. <View style={styles.btnItem}>
  46. <View style={styles.btnItemLeft}>
  47. <Text style={{ fontSize: unitWidth * 60, color: "#FFE1EE" }}>D</Text>
  48. </View>
  49. <View style={styles.btnItemRight}>
  50. <Text style={{ fontSize: unitWidth * 28, color: "#666666" }}>XXXXXXXXXXXXXXXXXXXXXXXXXXXX</Text>
  51. </View>
  52. </View>
  53. </View>
  54. </View>
  55. )
  56. }
  57. }
  58. const styles = StyleSheet.create({
  59. container: {
  60. flex: 1,
  61. alignItems: "center"
  62. },
  63. topArea: {
  64. width: "100%",
  65. paddingLeft: unitWidth * 24,
  66. paddingRight: unitWidth * 24,
  67. paddingTop: unitHeight * 20,
  68. },
  69. tit: {
  70. borderLeftWidth: unitWidth * 4,
  71. borderColor: "#FA788A",
  72. paddingLeft: unitWidth * 12,
  73. justifyContent: "center",
  74. marginBottom: unitHeight * 47
  75. },
  76. titText: {
  77. fontSize: unitWidth * 28,
  78. color: "#333333",
  79. fontWeight: "bold"
  80. },
  81. btnList: {
  82. paddingLeft: unitWidth * 30,
  83. marginTop: unitHeight * 60,
  84. width: "100%"
  85. },
  86. btnItem: {
  87. width: unitWidth * 642,
  88. height: unitHeight * 80,
  89. backgroundColor: "#F2F2F2",
  90. marginBottom: unitHeight * 30,
  91. borderRadius: unitHeight * 80,
  92. flexDirection: "row",
  93. alignItems: "center",
  94. borderWidth: 1,
  95. borderColor: "#ccc"
  96. },
  97. btnItemLeft: {
  98. flex: 1,
  99. height: "100%",
  100. justifyContent: "center",
  101. alignItems: "center",
  102. borderRightWidth: 1,
  103. borderRightColor: "#FFD1D1"
  104. },
  105. btnItemRight: {
  106. flex: 4,
  107. paddingLeft: unitWidth * 23,
  108. paddingRight: unitWidth * 23
  109. },
  110. btnItemRed: {
  111. width: unitWidth * 642,
  112. height: unitHeight * 80,
  113. backgroundColor: "#FB788A",
  114. marginBottom: unitHeight * 30,
  115. borderRadius: unitHeight * 80,
  116. flexDirection: "row",
  117. alignItems: "center",
  118. borderWidth: 1,
  119. borderColor: "#FF4A6C"
  120. }
  121. })