import React, { Component } from 'react';
import { View, Text } from 'react-native';
import { TabNavigator, TabView } from 'react-navigation';
import userInfoPageScreen from './userinfopage';
import fwInfo from './fwInfo';

const Content = TabNavigator({
  FWInfo: {
    screen: fwInfo,
  },
  UserInfoPageScreen: {
    screen: userInfoPageScreen,
  },
}, {
  tabBarPosition: 'bottom',
  animationEnabled: true,
  tabBarOptions: {
    activeTintColor: '#e91e63',
    inactiveTintColor: 'gray',
    labelStyle: {
      fontSize: 12,
    },
    showIcon: true,
  },
});

class MainPage extends Component {
  render() {
    return (
      <View style={{ flex: 1 }}>
        <View style={{ height: 36, backgroundColor: '#08BBF9', flexDirection: 'row' }}>
          <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
            <Text style={{ fontSize: 18, color: 'white', alignSelf: 'center' }}>深圳房屋普查</Text>
          </View>
        </View>
        <Content navigation={this.props.navigation} />
      </View>
    );
  }
}
MainPage.router = Content.router;
export default MainPage;

