help with webview


#1

I am trying to make a webview into the entire screen of the device. As you can see, on android, looks better than IOS


     <WebView
                ref={'webview'}
                automaticallyAdjustContentInsets={true}
                scalesPageToFit={this.state.scalesPageToFit}
                style={{width: Dimensions.get('window').width,
                       height: Dimensions.get('window').height}}
                source={{html: response}}/>

#2

All you need:

      <View
        style={{
          flex: 1
        }}
      ><Webview /></View>

#3

thanks for your response, but I get the same result in IOS, it dosent show full screen


#4

this is what I did

  <View  style={{flex: 1}}>
            <WebView
                source={{html: response}}/>
            </View>

#5

By any change is there any parent views other than this new one you added, also by any chance can you make it a snack


#6

No I already tried adding the view with the flex of one, removing it and is the same I could post to on snack


#7

here it is


#8

https://snack.expo.io/r1TF5dI-Q


#9

Hey @ispcloudservices here is an example of a webview that is full screen https://snack.expo.io/HJRKKTmAx


#10

You should add a flex of 1 to your web view as shown in the example of @jimmylee


closed #11

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.