Advertisement
Guest User

Untitled

a guest
Nov 12th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.82 KB | None | 0 0
  1. import React, { Component } from "react";
  2. import {
  3. View,
  4. Text,
  5. StyleSheet,
  6. Image,
  7. Dimensions,
  8. TouchableOpacity
  9. } from "react-native";
  10. import { connect } from "react-redux";
  11.  
  12.  
  13. class DetailEvent extends Component {
  14. static navigatorStyle = {
  15. // navBarTransparent: true,
  16. // drawUnderNavBar: true,
  17. // navBarBackgroundColor: '#FFFFFF',
  18. topBarElevationShadowEnabled: false,
  19. // statusBarColor: 'transparent', // change the color of the status bar.
  20. // drawUnderStatusBar: true,
  21. // navBarHidden: true,
  22. // drawUnderNavBar: true,
  23. navBarCustomView: 'EventDibs.Navbar',
  24. tabBarHidden: true,
  25.  
  26. };
  27.  
  28. constructor(props) {
  29. super(props);
  30. this.props.navigator.setOnNavigatorEvent(this.onNavigatorEvent.bind(this));
  31. }
  32.  
  33. onNavigatorEvent(event) { // this is the onPress handler for the two buttons together
  34. if (event.type == 'NavBarButtonPress') { // this is the event type for button presses
  35. if (event.id == 'back1') { // this is the same id field from the static navigatorButtons definition
  36. alert('NavBar');
  37. }
  38. }
  39. }
  40.  
  41. componentWillMount() {
  42.  
  43. }
  44.  
  45. state = {
  46.  
  47. }
  48.  
  49. render() {
  50. return (
  51. <View style={styles.container}>
  52. <Text style={{ color: 'red' }}>detail event</Text>
  53. </View>
  54. )
  55. }
  56. }
  57.  
  58. const deviceHeight = Dimensions.get('window').height
  59. const deviceWidth = Dimensions.get('window').width
  60.  
  61. const styles = StyleSheet.create({
  62. container: {
  63. flex: 1,
  64. alignItems: 'center',
  65. justifyContent: 'center',
  66. }
  67. })
  68.  
  69. const mapDispatchToProps = dispatch => {
  70. return {
  71.  
  72. };
  73. };
  74.  
  75. export default connect(null, null)(DetailEvent);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement