Webview отображает веб-сайт Facebook, но не может загружать фотографии - PullRequest
0 голосов
/ 12 апреля 2019

Я сделал приложение для веб-просмотра с реагировать на родной язык, чтобы отобразить веб-сайт Facebook, но была проблема, когда я хотел загрузить фотографию, нажав кнопку загрузки фото в разделе статуса всплывающего окна, ответа не было ... какое было решение?




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

export default class App extends Component {
  constructor(props) {
    super(props);
    this.reload = this.reload.bind(this);
  }

  reload() {
    this.webview.reload();
  }
  render() {
    return (
      <View style={{ flex: 1 }}>
        <View style={{ height: 20 }} />
        <WebView
          ref={ref => (this.webview = ref)}
          source={{ uri: 'https://facebo.com' }}
          onError={console.error.bind(console, 'error')}
          bounces={false}
          onShouldStartLoadWithRequest={() => true}
          javaScriptEnabledAndroid={true}
          startInLoadingState={true}
          style={{ flex: 1 }}
        />
          <View style={{alignItems:'center'}}>
                <TouchableOpacity onPress={this.reload}>
                      <Image source={require('../assets/reload.png')} style={styles.fab} />
                </TouchableOpacity>
          </View>
      </View>
    );
  }
}
const styles = StyleSheet.create({
 fab: { 
    width: 40, 
    height: 40, 
    justifyContent: 'center', 
    },

});
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...