title: How to set background image over view in react native?
body: <p>I'm trying to set a background image in react native.I want a background cover image. I've done like the below</p>
  
  <pre><code>&lt;ScrollView&gt;
      &lt;View&gt;
          &lt;Image source={ require('../Images/5.jpg') } style = { styles.image } /&gt;
              {
                  this.state.details.map(a =&gt;
                      &lt;View&gt;
                          &lt;Text style={ styles.textStyle } &gt; { a.content = a.content.replace(regex, '') } &lt; /Text&gt;
                          &lt; RadioForm style= {{ width: 350 - 30 }} outerColor = "#080103" innerColor = "#FF5733" itemShowKey = "label" itemRealKey = "item" dataSource = { transform(a.options) } onPress = {(item)=&gt;this._onSelect(item)}/&gt;
                      &lt;/View&gt;)
              }
      &lt;/View&gt;
  &lt;/ScrollView&gt;
  
  const styles = StyleSheet.create({
      image: {
          flex: 1,
          resizeMode: 'cover',
          position: 'absolute',
          width: "100%",
          flexDirection: 'column'
      },
      textStyle: {
          fontSize: 16,
          color: '#000',
          padding: 5,
      },
  });
  </code></pre>
  
  <p>But I'm getting something like this </p>
  
  <p><a href="https://i.stack.imgur.com/pkGc0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pkGc0.png" alt="this is i&#39;m getting"></a></p>