2019-06-21

* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow
*/

import React, {Component} from 'react';
import {
  Platform, 
  StyleSheet, 
  Text, 
  View,
  Switch,
  AlertIOS,
  ActivityIndicator,
} from 'react-native';



type Props = {};
var Dimensions = require('Dimensions');
var width = Dimensions.get('window').width;
export default class ActivityIndicator9 extends Component {
  constructor(props) 
  {
      super(props);
      this.state = 
      {
            animating:true,
            switchstate:true
      };
  }

  render() {
      return (
      

        

        

        this.click(value)}/>
      
       
  );
  }

  click(value){
      console.log(value.toString());
      if (value){
          AlertIOS.alert(value.toString());
      }
      this.setState({
        animating:!this.state.animating,
        switchstate:!this.state.switchstate
      })
  }
}


const styles = StyleSheet.create({
  container:{
      backgroundColor:"#dddddd",
      flex:1,
      alignItems:'center',
      justifyContent:"center",
      flexDirection:"column",
  },
  centering:{
    marginTop:10,
    
  }

})




@end```

你可能感兴趣的:(2019-06-21)