No Description

ShortVideoEndView.js 7.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. /**
  2. * Created by zack on 2018/4/19.
  3. */
  4. import {
  5. View,
  6. Text,
  7. Image,
  8. StyleSheet,
  9. TouchableHighlight,
  10. ImageBackground
  11. } from 'react-native'
  12. import React, { PureComponent } from "react";
  13. import ScreenDimensions from '../../../utils/ScreenDimensions'
  14. import ScreenDimensionsClientHeight from '../../../utils/ScreenDimensions'
  15. import NavigationBarHeight from '../../../utils/NavigationBarHeight'
  16. import TabBarHeight from '../../../utils/TabBarHeight'
  17. import RefreshInfiniteListView from '../../../utils/RefreshInfiniteListView'
  18. export default class ShortVideoEndView extends PureComponent {
  19. constructor(props) {
  20. super(props)
  21. this.state = {
  22. leftText: "",
  23. rightText: ""
  24. }
  25. }
  26. componentDidMount() {
  27. }
  28. componentWillReceiveProps(nextProps) {
  29. if (nextProps.selectedPages != this.props.selectedPages) {
  30. this.setState({
  31. rate: nextProps.selectedPages
  32. })
  33. }
  34. }
  35. render() {
  36. let chatIcon = require('../../../resources/images/TabBar/Community/ShortVideo/wechat.png');
  37. let backIcon = require('../../../resources/images/TabBar/Community/ShortVideo/circle_end.png');
  38. let chatFirendIcon = require('../../../resources/images/TabBar/Community/ShortVideo/firend.png');
  39. let QQIcon = require('../../../resources/images/TabBar/Community/ShortVideo/qq.png');
  40. let sinaIcon = require('../../../resources/images/TabBar/Community/ShortVideo/weibo.png');
  41. let replayIcon = require('../../../resources/images/TabBar/Community/ShortVideo/replay.png');
  42. return (
  43. <View style={styles.playJudgeStyle}>
  44. <View style={styles.judgeTopStyle}>
  45. <View style={styles.judgeLineStyle}>
  46. </View>
  47. <Text style={styles.judgeTopTextStyle}>
  48. {"分享到"}
  49. </Text>
  50. <View style={styles.judgeLineStyle}>
  51. </View>
  52. </View>
  53. <View style={styles.judgeCenterStyle}>
  54. <View style={styles.shareStyle}>
  55. <ImageBackground source={backIcon} style={styles.backStyle}>
  56. <TouchableHighlight
  57. underlayColor={"rgba(255,255,255,0)"}
  58. onPress={this.onPressChat.bind(this)}>
  59. <View style={styles.shareChildrenView}>
  60. <Image source={chatIcon} style={styles.chatIcon} />
  61. </View>
  62. </TouchableHighlight>
  63. </ImageBackground>
  64. <Text style={styles.textStyle}>微信</Text>
  65. </View>
  66. <View style={styles.shareStyle}>
  67. <ImageBackground source={backIcon} style={styles.backStyle}>
  68. <TouchableHighlight
  69. underlayColor={"rgba(255,255,255,0)"}
  70. onPress={this.onPressChatFirend.bind(this)}>
  71. <View style={styles.shareChildrenView}>
  72. <Image source={chatFirendIcon} style={styles.chatFirendStyle} />
  73. </View>
  74. </TouchableHighlight>
  75. </ImageBackground>
  76. <Text style={styles.textStyle}>朋友圈</Text>
  77. </View>
  78. <View style={styles.shareStyle}>
  79. <ImageBackground source={backIcon} style={styles.backStyle}>
  80. <TouchableHighlight
  81. underlayColor={"rgba(255,255,255,0)"}
  82. onPress={this.onPressQQ.bind(this)}>
  83. <View style={styles.shareChildrenView}>
  84. <Image source={QQIcon} style={styles.QQStyle} />
  85. </View>
  86. </TouchableHighlight>
  87. </ImageBackground>
  88. <Text style={styles.textStyle}>QQ</Text>
  89. </View>
  90. <View style={styles.shareStyle}>
  91. <ImageBackground source={backIcon} style={styles.backStyle}>
  92. <TouchableHighlight
  93. underlayColor={"rgba(255,255,255,0)"}
  94. onPress={this.onPressSina.bind(this)}>
  95. <View style={styles.shareChildrenView}>
  96. <Image source={sinaIcon} style={styles.sinaStyle} />
  97. </View>
  98. </TouchableHighlight>
  99. </ImageBackground>
  100. <Text style={styles.textStyle}>新浪微博</Text>
  101. </View>
  102. </View>
  103. <View style={styles.judgeBottomStyle}>
  104. <TouchableHighlight
  105. underlayColor={"rgba(255,255,255,0)"}
  106. onPress={this.onPressReplay.bind(this)}>
  107. <View style={styles.replayChildrenView}>
  108. <Image source={replayIcon} style={styles.replayStyle} />
  109. <Text style={styles.replayTextStyle}>{"重播"}</Text>
  110. </View>
  111. </TouchableHighlight>
  112. </View>
  113. </View>
  114. )
  115. }
  116. onPressChat() {
  117. }
  118. onPressChatFirend(){
  119. }
  120. onPressQQ(){
  121. }
  122. onPressSina(){
  123. }
  124. onPressReplay(){
  125. //重播
  126. this.props.replay();
  127. }
  128. }
  129. const styles = StyleSheet.create({
  130. //播放结束的style
  131. playJudgeStyle: {
  132. width: ScreenDimensions.width,
  133. height: 195,
  134. marginTop: -195,
  135. backgroundColor: "rgba(0,0,0,0.9)"
  136. },
  137. judgeTopStyle: {
  138. marginHorizontal: 58 / 2,
  139. height: 62 / 2,
  140. marginTop: 32 / 2,
  141. flexDirection: "row",
  142. alignItems: "center"
  143. },
  144. judgeLineStyle: {
  145. flex: 1.5,
  146. height: 1,
  147. backgroundColor: "#ffffff"
  148. },
  149. judgeTopTextStyle: {
  150. // flex:1,
  151. marginHorizontal: 10,
  152. fontSize: 14,
  153. color: "#9c9c9c"
  154. },
  155. judgeCenterStyle: {
  156. marginHorizontal: 45 / 2,
  157. flexDirection: "row",
  158. alignItems: "center",
  159. marginTop:20,
  160. },
  161. shareChildrenView: {
  162. justifyContent: "center",
  163. alignItems: "center"
  164. },
  165. chatIcon: {
  166. width: 58 / 2,
  167. height: 49 / 2
  168. },
  169. textStyle: {
  170. fontSize: 14,
  171. color: "#9c9c9c",
  172. marginTop: 8,
  173. },
  174. backStyle: {
  175. width: 92 / 2,
  176. height: 92 / 2,
  177. justifyContent: "center",
  178. alignItems: "center"
  179. },
  180. shareStyle: {
  181. marginRight: 28 / 2,
  182. alignItems: "center",
  183. flex:1
  184. },
  185. chatFirendStyle:{
  186. width:47/2,
  187. height:47/2
  188. },
  189. QQStyle:{
  190. width:41/2,
  191. height:45/2
  192. },
  193. sinaStyle:{
  194. width:58/2,
  195. height:48/2
  196. },
  197. judgeBottomStyle:{
  198. justifyContent:"flex-start",
  199. alignItems:"center",
  200. flex:1,
  201. flexDirection:"row",
  202. paddingLeft:20,
  203. },
  204. replayChildrenView:{
  205. alignItems:"center",
  206. flexDirection:"row"
  207. },
  208. replayStyle:{
  209. width:14,
  210. height:14
  211. },
  212. replayTextStyle:{
  213. fontSize:14,
  214. color:"#fff",
  215. marginLeft:13
  216. }
  217. })