import React, {PropTypes, Component} from 'react';
import {
    Button,
    View,
    StyleSheet
} from 'react-native';

import Icon from 'react-native-vector-icons/MaterialIcons';

const color = () => Math.floor(255 * Math.random());

class AboutView extends Component {
  static displayName = 'AboutView';

  static navigationOptions = {
    title: '关于',
    tabBarIcon: (props) => (
        <Icon name='info' size={24} color={props.tintColor} />
    )
  };

  static propTypes = {
    navigate: PropTypes.func.isRequired
  };

  constructor(props) {
    super(props);
    this.state = {
      background: `rgba(${color()},${color()},${color()}, 1)`
    };
  }

  open = () => {
    this.props.navigate({routeName: 'About'});
  };

  render() {
    const buttonText = 'Open in Stack Navigator';
    return (
            <View style={[styles.container, {backgroundColor: this.state.background}]}>
                <Button color='#ee7f06' title={buttonText} onPress={this.open}/>
            </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center'
  }
});

export default AboutView;

@@ -57,22 +57,20 @@
 t %7B%0A    
-Button
+Text
 ,%0A    Vi
@@ -177,62 +177,8 @@
 ';%0A%0A
-const color = () =%3E Math.floor(255 * Math.random());%0A%0A
 clas
@@ -512,96 +512,8 @@
 s);%0A
-    this.state = %7B%0A      background: %60rgba($%7Bcolor()%7D,$%7Bcolor()%7D,$%7Bcolor()%7D, 1)%60%0A    %7D;%0A
   %7D%0A
@@ -600,58 +600,8 @@
 ) %7B%0A
-    const buttonText = 'Open in Stack Navigator';%0A
     
@@ -638,9 +638,8 @@
 le=%7B
-%5B
 styl
@@ -654,133 +654,131 @@
 iner
-, %7BbackgroundColor: this.state.background%7D%5D%7D%3E%0A                %3CButton color='#ee7f06' title=%7BbuttonText%7D onPress=%7Bthis.open%7D/
+%7D%3E%0A              %3CText%3E%E8%81%94%E7%B3%BB%E6%88%91%E4%BB%AC%3C/Text%3E%0A              %3CText%3E%E7%89%88%E6%9C%AC%3C/Text%3E%0A              %3CText%3E%E8%AF%84%E4%BB%B7%3C/Text%3E%0A              %3CText%3E%E5%8F%8D%E9%A6%88%3C/Text
 %3E%0A  

update basic text