12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- import React, {
- Component,
- Text,
- View,
- ScrollView,
- TouchableOpacity,
- StyleSheet
- } from 'react-native';
-
- export default class ThirdTabScreen extends Component {
- static navigatorStyle = {
- drawUnderTabBar: true
- };
- constructor(props) {
- super(props);
- }
- render() {
- return (
- <View style={{flex: 1, padding: 20}}>
-
- <TouchableOpacity onPress={ this.onPushPress.bind(this) }>
- <Text style={styles.button}>Push Plain Screen</Text>
- </TouchableOpacity>
-
- <TouchableOpacity onPress={ this.onPushStyledPress.bind(this) }>
- <Text style={styles.button}>Push Styled Screen</Text>
- </TouchableOpacity>
-
- <TouchableOpacity onPress={ this.onPushStyled2Press.bind(this) }>
- <Text style={styles.button}>Push Styled Screen 2</Text>
- </TouchableOpacity>
-
- <TouchableOpacity onPress={ this.onModalPress.bind(this) }>
- <Text style={styles.button}>Show Modal Screen</Text>
- </TouchableOpacity>
-
- </View>
- );
- }
- onPushPress() {
- this.props.navigator.push({
- title: "More",
- screen: "example.PushedScreen"
- });
- }
- onPushStyledPress() {
- this.props.navigator.push({
- title: "Styled",
- screen: "example.StyledScreen"
- });
- }
- onPushStyled2Press () {
- this.props.navigator.push({
- title: "Styled",
- titleImage: require('../../img/two.png'),
- screen: "example.StyledScreen"
- });
- }
- onModalPress() {
- this.props.navigator.showModal({
- title: "Modal",
- screen: "example.ModalScreen"
- });
- }
- }
-
- const styles = StyleSheet.create({
- button: {
- textAlign: 'center',
- fontSize: 18,
- marginBottom: 10,
- marginTop:10,
- color: 'blue'
- }
- });
|