import React, { Component, Text, View, ScrollView, TouchableOpacity, StyleSheet, AlertIOS } from 'react-native'; export default class FirstTabScreen extends Component { static navigatorButtons = { leftButtons: [{ icon: require('../../img/navicon_menu.png'), id: 'menu' }], rightButtons: [ { title: 'Edit', id: 'edit' }, { icon: require('../../img/navicon_add.png'), id: 'add' } ] }; static navigatorStyle = { drawUnderTabBar: true }; constructor(props) { super(props); // if you want to listen on navigator events, set this up this.props.navigator.setOnNavigatorEvent(this.onNavigatorEvent.bind(this)); } onNavigatorEvent(event) { if (event.id == 'menu') { this.props.navigator.toggleDrawer({ side: 'left', animated: true }); } if (event.id == 'edit') { AlertIOS.alert('NavBar', 'Edit button pressed'); } if (event.id == 'add') { AlertIOS.alert('NavBar', 'Add button pressed'); } } render() { return ( Push Plain Screen Push Styled Screen Show Modal Screen Show LightBox ); } onPushPress() { this.props.navigator.push({ title: "More", screen: "example.PushedScreen" }); } onPushStyledPress() { this.props.navigator.push({ title: "Styled", screen: "example.StyledScreen" }); } onModalPress() { this.props.navigator.showModal({ title: "Modal", screen: "example.ModalScreen" }); } onLightBoxPress() { this.props.navigator.showLightBox({ screen: "example.LightBoxScreen", style: { backgroundBlur: "dark" } }); } } const styles = StyleSheet.create({ button: { textAlign: 'center', fontSize: 18, marginBottom: 10, marginTop:10, color: 'blue' } });