Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[android] react native 0.43 webview issue display blank?? #13627

Closed
gongchao opened this issue Apr 22, 2017 · 4 comments
Closed

[android] react native 0.43 webview issue display blank?? #13627

gongchao opened this issue Apr 22, 2017 · 4 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@gongchao
Copy link

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

import React, { Component } from 'react';
import {
  AppRegistry,
  StyleSheet,
  Text,
  View,
  WebView,
  TouchableOpacity
} from 'react-native';

export default class testapp extends Component {

  constructor(props) {
    super(props)
    this.state = {
      tab: 0
    }
  }

  render() {
    return (
      <View style={styles.container}>
        <View style={{flex: 1, paddingTop: 30, paddingLeft: 30}}>
          <TouchableOpacity onPress={()=>this.setState({tab: this.state.tab ? 0 : 1})}><Text>切换</Text></TouchableOpacity>
          <Text>{this.state.tab}</Text>
        </View>
        {!!this.state.tab && (
          <WebView source={{uri: 'http://www.google.com'}} style={{ width: 200, height: 200 }}/>
        )}
        {!this.state.tab && (
          <WebView source={{uri: 'http://www.google.com'}} style={{ width: 200, height: 200 }}/>
        )}
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    flexDirection: 'row',
    backgroundColor: '#F5FCFF',
  }
});

AppRegistry.registerComponent('testapp', () => testapp);

上边代码,点击 切换 tab

如果点击速度快的话,webview 会不显示,只在 android 是这样子。

并且没有任何报错信息

android 6/5

@gongchao
Copy link
Author

gongchao commented Apr 22, 2017

<Text>tab</Text> Quick Tap Tiles, <WebView/> display blank ??

android 5\6

@gongchao gongchao changed the title [android] react native 0.43 webview bug?? [android] react native 0.43 webview issue display blank?? Apr 22, 2017
@gongchao
Copy link
Author

W/art: Attempt to remove non-JNI local reference, dumping thread
W/AwContents: onDetachedFromWindow called when already detached. Ignoring
I/TAG: AwSettings.setUseWideViewPort === use=false; mAppPackageName=com.testapp
W/cr.ScreenOrientation: Removing an inexistent observer!
I/cr.CleanupReference: --- CLEANING ONE REF

@gongchao
Copy link
Author

img

@hramos
Copy link
Contributor

hramos commented Apr 24, 2017

Hey, thanks for reporting this issue!

It looks like your description is missing some necessary information. Can you please add all the details specified in the template? This is necessary for people to be able to understand and reproduce the issue being reported.

I am going to close this, but feel free to open a new issue with the additional information provided. Thanks!

@hramos hramos closed this as completed Apr 24, 2017
@facebook facebook locked as resolved and limited conversation to collaborators May 24, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants