Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React, { Component } from "react";
- import {
- View,
- Text,
- StyleSheet,
- Image,
- Dimensions,
- TouchableOpacity
- } from "react-native";
- import { connect } from "react-redux";
- class DetailEvent extends Component {
- static navigatorStyle = {
- // navBarTransparent: true,
- // drawUnderNavBar: true,
- // navBarBackgroundColor: '#FFFFFF',
- topBarElevationShadowEnabled: false,
- // statusBarColor: 'transparent', // change the color of the status bar.
- // drawUnderStatusBar: true,
- // navBarHidden: true,
- // drawUnderNavBar: true,
- navBarCustomView: 'EventDibs.Navbar',
- tabBarHidden: true,
- };
- constructor(props) {
- super(props);
- this.props.navigator.setOnNavigatorEvent(this.onNavigatorEvent.bind(this));
- }
- onNavigatorEvent(event) { // this is the onPress handler for the two buttons together
- if (event.type == 'NavBarButtonPress') { // this is the event type for button presses
- if (event.id == 'back1') { // this is the same id field from the static navigatorButtons definition
- alert('NavBar');
- }
- }
- }
- componentWillMount() {
- }
- state = {
- }
- render() {
- return (
- <View style={styles.container}>
- <Text style={{ color: 'red' }}>detail event</Text>
- </View>
- )
- }
- }
- const deviceHeight = Dimensions.get('window').height
- const deviceWidth = Dimensions.get('window').width
- const styles = StyleSheet.create({
- container: {
- flex: 1,
- alignItems: 'center',
- justifyContent: 'center',
- }
- })
- const mapDispatchToProps = dispatch => {
- return {
- };
- };
- export default connect(null, null)(DetailEvent);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement