title: react-native:Show spinner at the center of the screen
body: <p>I want to show the spinner at the center of screen.I used alignItems, justifyContent and flex but there is no change in the position then i use margintop for correct positioning.why there is no change on the use of alignItems,justifyContent and flex?</p>
  
  <p>here i m using spinner.</p>
  
  <pre><code> return (
    &lt;View style={style.spinnerStyle}&gt;
    &lt;Spinner size ="large" /&gt;
    &lt;/View&gt;
   );
   const style = {
  spinnerStyle: {
    flex: 1,
    marginTop:240
  }
  };
  </code></pre>
  
  <p>Spinner.js</p>
  
  <pre><code>  import React from 'react';
    import {View,ActivityIndicator} from 'react-native';
  
    const Spinner = ({size}) =&gt; {
    return (
    &lt;View style = {styles.spinnerStyle}&gt;
    &lt;ActivityIndicator size={size || 'large'} /&gt;
    &lt;/View&gt;
    );
   };
  
  const styles = {
  spinnerStyle: {
  flex: 1,
  justifyContent: 'center',
  alignItems:'center'
   }
   };
  
  export { Spinner };
  </code></pre>