content: /**
   * Created by tompda on 2017/3/10.
   */
  /**
   * Created by tompda on 2017/2/5.
   */
  /**
   * Sample React Native App
   * https://github.com/facebook/react-native
   * @flow
   */
  
  import React, { Component } from 'react';
  import {
      StyleSheet,
      Text,
      View,
      ScrollView,
      Navigator,
      InteractionManager,
      AlertIOS,
      Linking,
  } from 'react-native';
  
  
  
  import MainItem from '../../component/mainItem';
  import NavitatorBar from '../../component/navigatorBar';
  
  import UnionPay from './UnionPay';
  import Wechat from './wechatLogin/wechatLogin';
  //import PullRefresh from './PullRefresh';
  import WebView from './WebView';
  
  
  export default class index extends Component {
  
  
      render() {
          return (
              <View style={{flex:1,backgroundColor:'#ffffff'}}>
                  <NavitatorBar
                      title = 'SDK'
                      leftOnPress = {()=>this._pop()}
                      leftContext = '返回'
                  />
                  <ScrollView
                      style={{flex:1}}
                      contentContainerStyle={styles.container}>
                      <MainItem
                          itemTitle = 'UnionPay'
                          onPress={()=>this.pushToUnionPay()}
                      />
                      <MainItem
                          itemTitle = 'Wechat'
                          onPress={()=>this.pushToWechat()}
                      />
  
                      {/*<MainItem*/}
                          {/*itemTitle = 'PullRefresh'*/}
                          {/*onPress={()=>this.pushToPullRefresh()}*/}
                      {/*/>*/}
  
                      <MainItem
                          itemTitle = 'WebView'
                          onPress={()=>this.pushToWebView()}
                      />
  
                  </ScrollView>
              </View>
          );
      }
  
  
      _pop = () => {
          const {navigator} = this.props;
          if(navigator){
              navigator.pop();
  
          }
      }
  
  
  
  
      //UnionPay
      pushToUnionPay = () => {
          const {navigator} = this.props;
          InteractionManager.runAfterInteractions(()=>{
              if(navigator){
                  navigator.push({
                      name:'UnionPay',
                      component:UnionPay,
                  })
              }
          });
      };
      //Wechat
      pushToWechat = () => {
          const {navigator} = this.props;
          InteractionManager.runAfterInteractions(()=>{
              if(navigator){
                  navigator.push({
                      name:'Wechat',
                      component:Wechat,
                  })
              }
          });
      };
  
      // //PullRefresh
      // pushToPullRefresh = () => {
      //     const {navigator} = this.props;
      //     InteractionManager.runAfterInteractions(()=>{
      //         if(navigator){
      //             navigator.push({
      //                 name:'PullRefresh',
      //                 component:PullRefresh,
      //             })
      //         }
      //     });
      // };
  
      //WebView
      pushToWebView = () => {
          const {navigator} = this.props;
          InteractionManager.runAfterInteractions(()=>{
              if(navigator){
                  navigator.push({
                      name:'WebView',
                      component:WebView,
                  })
              }
          });
      };
  
  
  }
  
  const styles = StyleSheet.create({
      container: {
          //flex: 1,
      },
  });
  
  