Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.52 KB | None | 0 0
  1. import React, { Component } from 'react'
  2. import {
  3. StyleSheet,
  4. Button,
  5. View,
  6. SafeAreaView,
  7. Text,
  8. Alert,
  9. ImageBackground,
  10. Image,
  11. TouchableHighlight,
  12. ScrollView,
  13. } from 'react-native';
  14. import Constants from 'expo-constants';
  15. function Separator() {
  16. return <View style={styles.separator} />;
  17. }
  18. export default class App extends Component {
  19. constructor(props) {
  20. super(props)
  21. this.state = { count: 0 }
  22. }
  23.  
  24. onPress = () => {
  25. this.setState({
  26. count: this.state.count+1
  27. })
  28. }
  29. render(){
  30. return (
  31. <ScrollView>
  32. <SafeAreaView style={styles.container}>
  33. <View>
  34. <Text style={styles.head}>
  35. Top Chart Anime
  36. </Text>
  37. <Text style={styles.head1}>
  38. รวบรวมอนิเมะยอดฮิต2019
  39. </Text>
  40. <Separator />
  41. <Text style={styles.title}>
  42. Arifureta Shokugyou de Sekai Saikyou
  43. </Text>
  44. <Text style={styles.title}>
  45. อาชีพกระจอกแล้วทำไม ยังไงข้าก็เทพ
  46. </Text>
  47. <View>
  48. <Image style={styles.pic}
  49. style={{width: 380, height: 380}}
  50. source={require('./ari.jpg')}
  51. />
  52. </View>
  53. <Button
  54. title="แสดงรายละเอียด"
  55. onPress={() => Alert.alert('อาชีพกระจอกแล้วทำไม ยังไงข้าก็เทพ ฮาจิเมะ วัยรุ่นหนุ่มเกมโอตาคุ ได้ถูกเทพจากต่างโลกอัญเชิญมาพร้อมกับเพื่อนร่วมชั้นหลายคน จำเป็นอาศัยในโลกนี้และช่วยกอบกู้โลก ฮาจิเมะ เริ่มด้วยอาชีพนักสร้างอาวุธที่ไม่มีประโยชน์ในการต่อสู้แล้วยังถูกเหยียดหยามจากเพื่อนร่วมชั้น ที่ส่วนใหญ่ที่อยู่ในระดับนักรบและผู้กล้า แต่ภายหลังโศกนาฏกรรมครั้งใหญ่ที่เกิดกับเพื่อนร่วมชั้น ฮาจิเมะที่พยายามเอาชีวิตรอด กลายเป็นจุดเปลี่ยนชีวิตของเขา จนกลายเป็นนักสร้างอาวุธที่มีความสามารถสุดแกร่งไป')}
  56. />
  57. <TouchableHighlight
  58. style={styles.button}
  59. onPress={this.onPress}
  60. >
  61. <Text style={styles.title1}> LIKE </Text>
  62. </TouchableHighlight>
  63. <Text style={styles.title}>
  64. จำนวนผู้ถูกใจ
  65. </Text>
  66. <Text style={styles.title}>
  67. { this.state.count !== 0 ? this.state.count: null }
  68. </Text>
  69. </View>
  70. <Separator />
  71. <View>
  72. <Text style={styles.title}>
  73. Isekai Cheat Magician
  74. </Text>
  75. <Text style={styles.title}>
  76. ผ่ามิติแหกกฎมนตรา
  77. </Text>
  78. <View>
  79. <Image style={styles.pic}
  80. style={{width: 380, height: 380}}
  81. source={require('./lsekai.jpg')}
  82. />
  83. </View>
  84. <Button
  85. title="แสดงรายละเอียด"
  86. color="#f194ff"
  87. onPress={() => Alert.alert('เป็นเรื่องราวของนักเรียนมัธยมสองคน Nishimura Taichi และ Azuma Rin ที่อยู่ดีๆก็หลุดไปต่างโลกแบบยุโรปยุคกลางที่มีเวทย์มนต์และมอนสเตอร์ เพื่อที่จะมีชีวิตรอดทั้งสองจึงตัดสินใจที่จะไปเป็นนักผจญภัย แต่เมื่อไปตรวจสอบพลังเวทย์ก็พบว่าทั้งคู่มีพลังที่เหนือกว่าผู้คนทั่วไปบนโลกนี้หลายเท่านัก')}
  88. />
  89. <TouchableHighlight
  90. style={styles.button}
  91. onPress={this.onPress}
  92. >
  93. <Text style={styles.title1}> LIKE </Text>
  94. </TouchableHighlight>
  95. <Text style={styles.title}>
  96. จำนวนผู้ถูกใจ
  97. </Text>
  98. <Text style={styles.title}>
  99. { this.state.count !== 0 ? this.state.count: null }
  100. </Text>
  101. </View>
  102. <Separator />
  103. <View>
  104. <Text style={styles.title}>
  105. Kimetsu no Yaiba
  106. </Text>
  107. <Text style={styles.title}>
  108. ดาบพิฆาตอสูร
  109. </Text>
  110. <View>
  111. <Image style={styles.pic}
  112. style={{width: 380, height: 380}}
  113. source={require('./yaiba.jpg')}
  114. />
  115. </View>
  116. <Button
  117. title="แสดงรายละเอียด"
  118. color="#2AC69E"
  119. onPress={() => Alert.alert('เรื่องราวในยุคไทโชทันจิโร่เด็กหนุ่มขายถ่านที่แสนอ่อนโยน วันหนึ่งครอบครัวของเขาถูกอสูรฆ่าตาย ส่วนเนซึโกะ น้องสาวของเขาก็โดนเปลี่ยนเป็นอสูร ในตอนนั้นเองนักล่าอสูรนามว่า "โทมิโอกะ งิยู" ก็ได้ปรากฏตัวขึ้นและคิดจะกำจัดเนซึโกะ ทว่าเขาก็ต้องประหลาดใจที่เนซึโกะกับทันจิโร่กลับปกป้องกันและกัน ยิ่งได้เห็นฝีมือการต่อสู้ของทันจิโร่ทำให้ งิยูตัดสินใจส่งตัวพวกเขาไปให้สหายเก่าแก่ของตนเองช่วยฝึกฝนให้ นั่นจึงเป็นจุดเริ่มต้นการเป็นนักล่าอสูรของทันจิโร่ เพื่อช่วยน้องสาวให้กลับมาเป็นมนุษย์อีกครั้งและเพื่อตามล่าอสูรที่ฆ่าครอบครัวของเขา')}
  120. />
  121. <TouchableHighlight
  122. style={styles.button}
  123. onPress={this.onPress}
  124. >
  125. <Text style={styles.title1}> LIKE </Text>
  126. </TouchableHighlight>
  127. <Text style={styles.title}>
  128. จำนวนผู้ถูกใจ
  129. </Text>
  130. <Text style={styles.title}>
  131. { this.state.count !== 0 ? this.state.count: null }
  132. </Text>
  133. </View>
  134. <Separator />
  135. <View>
  136. <Text style={styles.title}>
  137. เป็นการแนะนำอนิเมะเท่านั้นจะไม่มีการสปอยใดๆทั้งสิ้น
  138. </Text>
  139. <View style={styles.fixToText}>
  140. <Button
  141. title="Previous"
  142. onPress={() => Alert.alert('กำลังพัฒนา')}
  143. />
  144. <Button
  145. title="Next"
  146. onPress={() => Alert.alert('กำลังพัฒนา')}
  147. />
  148. </View>
  149. </View>
  150. </SafeAreaView>
  151. </ScrollView>
  152. );
  153. }
  154. }
  155.  
  156. const styles = StyleSheet.create({
  157. container: {
  158. flex: 1,
  159. marginTop: Constants.statusBarHeight,
  160. marginHorizontal: 16,
  161. },
  162. head: {
  163. textAlign: 'center',
  164. fontSize: 50,
  165. marginVertical: 8,
  166. },
  167. head1: {
  168. textAlign: 'center',
  169. fontSize: 25,
  170. marginVertical: 8,
  171. },
  172. pic: {
  173. alignItems: 'center',
  174. marginVertical: 8,
  175. },
  176. title: {
  177. textAlign: 'center',
  178. marginVertical: 8,
  179. },
  180. title1: {
  181. textAlign: 'center',
  182. marginVertical: 8,
  183. backgroundColor: '#C227B7',
  184. },
  185. fixToText: {
  186. flexDirection: 'row',
  187. justifyContent: 'space-between',
  188. },
  189. separator: {
  190. marginVertical: 8,
  191. borderBottomColor: '#737373',
  192. borderBottomWidth: StyleSheet.hairlineWidth,
  193. },
  194. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement