No Description

CAVideoListHeaderView.js 2.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /**
  2. * Created by Sean on 2018/5/9.
  3. */
  4. import {
  5. View,
  6. Text,
  7. StyleSheet,
  8. TouchableOpacity,
  9. TouchableWithoutFeedback,
  10. ScrollView,
  11. SectionList,
  12. Image,
  13. Animated
  14. } from 'react-native'
  15. import React, {Component} from 'react'
  16. import PropTypes from 'prop-types';
  17. import {NavigationBarHeight, TabBarHeight, ScreenDimensions} from '../../../utils/DimensionsTools'
  18. const Header_Title = [
  19. {text: '推荐视频', image: require('../../../resources/Play/Video/video.png')},
  20. {text: '脱口秀', image: require('../../../resources/Play/Video/speak.png')},
  21. {text: '外教课', image: require('../../../resources/Play/Video/book.png')},
  22. {text: '音乐', image: require('../../../resources/Play/Video/music.png')},
  23. ];
  24. export default class CAVideoListHeaderView extends Component {
  25. constructor(props) {
  26. super(props)
  27. }
  28. render() {
  29. return(
  30. <View style={styles.headerContainer}>
  31. <Image style={styles.headerImageView} source={this.props.image} />
  32. <View style={{flex: 3}}>
  33. <Text style={styles.title}>
  34. {this.props.title}
  35. </Text>
  36. </View>
  37. <View style={styles.moreContainer}>
  38. <Text style={styles.moreTitle}>
  39. 更多 >>
  40. </Text>
  41. </View>
  42. <View style={{width: ScreenDimensions.width, height:2.0, backgroundColor: '#efeff4', position: 'absolute', left: 0,
  43. bottom: 0}} />
  44. </View>
  45. );
  46. }
  47. }
  48. const styles = StyleSheet.create({
  49. view: {
  50. flex: 1
  51. },
  52. headerContainer: {
  53. flexDirection: 'row',
  54. width: ScreenDimensions.width,
  55. alignItems: 'center',
  56. height: 43,
  57. backgroundColor: 'white'
  58. },
  59. headerImageView: {
  60. width: 17,
  61. height: 17,
  62. marginHorizontal: 9,
  63. },
  64. title: {
  65. width: 100,
  66. fontSize: 16,
  67. marginHorizontal: 12,
  68. },
  69. moreContainer: {
  70. flex: 1,
  71. alignItems: 'flex-end',
  72. justifyContent: 'center',
  73. },
  74. moreTitle: {
  75. fontSize: 11,
  76. color: "#aaaaaa",
  77. }
  78. })