0
const styles = StyleSheet.create({
    viewQuestion: {
        flex: 1,
        flexDirection: 'row'
    },
    question: {
        flex: 1,
        margin: 5
    }
});

    <View style={styles.viewQuestion} resizeMode={'contain'}>
         <Text style={{fontSize: 17, margin: 10, color: '#000'}}>{this.state.pointer}</Text>
         <WebView source={{html: this.state.item}} style={styles.question}/>
    </View>

I was set the view and webview with with flex: 1, but it does not work. How to make webview height to auto? I also set the height: 'auto' in webview style, but that does not work as swell, help and thanks

Pavley
  • 1
  • 1
  • Did you just try { width: "100%", height: "100%" } ? – Chris Dec 10 '18 at 11:26
  • yes, but the height of the **Webview** follows the height of the **text**. What I'm looking for is high to be auto for webview, because the content of the webview is a dynamic statement. – Pavley Dec 11 '18 at 04:07
  • Weird. Yah i have mine working fullscreen but I don't have text component inside: ` this.setState({ loading: e.nativeEvent.progress < 1 })} /> ` – Chris Dec 11 '18 at 05:46
  • Does this answer your question? [React native: webview height](https://stackoverflow.com/questions/35446209/react-native-webview-height) – Jules Sam. Randolph Oct 09 '20 at 23:29

0 Answers0