No Description

UserHeaderView.js 1.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /**
  2. * Created by zack on 2018/4/29.
  3. */
  4. import {
  5. View,
  6. Text,
  7. StyleSheet,
  8. Image,
  9. TouchableOpacity,
  10. TextInput
  11. } from 'react-native'
  12. import React, {Component} from 'react'
  13. import {NavigationBarHeight, TabBarHeight, ScreenDimensions} from '../../../../utils/DimensionsTools'
  14. export default class UserHeaderView extends Component {
  15. render() {
  16. return(
  17. <TouchableOpacity onPress={() => {
  18. this.props.didClickUserHeaderView()
  19. }} style={styles.View}>
  20. <View style={{flexDirection: 'row', alignItems: 'center'}}>
  21. <Image style={styles.ImageView} source={require('../../../../resources/images/TabBar/Community/Answer/img.png')}/>
  22. <View style={styles.NameBgView}>
  23. <Text style={styles.NameText}>{'Zack'}</Text>
  24. <Text style={styles.ReadText}>{"232人阅读"}</Text>
  25. </View>
  26. </View>
  27. <View style={styles.MyAnswerTextView}>
  28. <Text style={styles.MyAnswerText}>{"我的回答"}</Text>
  29. </View>
  30. <View style={{width: ScreenDimensions.width, height:1.0, backgroundColor: '#efeff4', position: 'absolute', left: 0,
  31. bottom: 0}} />
  32. </TouchableOpacity>
  33. )
  34. }
  35. }
  36. const styles = StyleSheet.create({
  37. View: {
  38. width: ScreenDimensions.width,
  39. height: 78,
  40. backgroundColor: '#ffffff',
  41. flexDirection: 'row',
  42. alignItems: 'center',
  43. justifyContent: 'space-between',
  44. },
  45. ImageView: {
  46. width: 48,
  47. height: 48,
  48. borderRadius: 24,
  49. marginLeft: 15,
  50. },
  51. NameBgView: {
  52. marginLeft: 33,
  53. justifyContent: 'center',
  54. },
  55. NameText: {
  56. fontSize: 16,
  57. color: "#1c1618"
  58. },
  59. ReadText: {
  60. fontSize: 16,
  61. color: "#9c9c9c"
  62. },
  63. MyAnswerTextView: {
  64. marginRight: 15,
  65. borderRadius: 10,
  66. backgroundColor: "rgba(211, 216, 213, 0.34)",
  67. justifyContent: 'center',
  68. alignItems: 'center',
  69. },
  70. MyAnswerText: {
  71. fontSize: 12,
  72. color: '#9c9c9c',
  73. paddingLeft: 5,
  74. paddingTop: 5,
  75. paddingRight: 5,
  76. paddingBottom: 5,
  77. },
  78. })