CourseDetails.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. StyleSheet,
  11. Text,
  12. View,
  13. Image,
  14. ScrollView,
  15. FlatList
  16. } from "react-native";
  17. import VideoExplain from './components/VideoExplain';
  18. import ScrollRow from "./components/ScrollRow";
  19. class CourseList extends Component {
  20. render() {
  21. return (
  22. <View style={styles.courseList}>
  23. <View style={[styles.padding, styles.title]}>
  24. <Text style={styles.font}>课件</Text>
  25. <Text style={styles.color}>共28课</Text>
  26. </View>
  27. <ScrollRow itemWidth={106} itemHeight={150} />
  28. </View>
  29. );
  30. }
  31. }
  32. export default class CourseDetails extends Component {
  33. render() {
  34. return (
  35. <ScrollView style={{backgroundColor: '#F0F1F5'}}>
  36. <VideoExplain
  37. title={'同步辅导语文一年级下册'}
  38. details={'汉字,作为象形文字,是中华文化的载体,本课程从甲骨文开始,让孩子爱上识字爱上文字的美。了解文字…'}
  39. uri={'http://chimee.org/vod/1.mp4'}
  40. />
  41. <CourseList></CourseList>
  42. </ScrollView>
  43. );
  44. }
  45. }
  46. const styles = StyleSheet.create({
  47. courseList: {
  48. width: '100%',
  49. backgroundColor: '#fff',
  50. marginTop: 8,
  51. },
  52. padding: {
  53. paddingLeft: 20,
  54. paddingRight: 20,
  55. },
  56. title: {
  57. display: 'flex',
  58. flexDirection: 'row',
  59. justifyContent: 'space-between',
  60. alignItems: 'center',
  61. },
  62. font: {
  63. paddingTop: 10,
  64. paddingBottom: 10,
  65. fontSize: 18,
  66. color: 'black',
  67. fontWeight: 'bold',
  68. },
  69. clor: {
  70. fontSize: 14,
  71. color: 'black',
  72. },
  73. });