码迷,mamicode.com
首页 > Web开发 > 详细

ReactNative学习-webView

时间:2016-07-05 18:55:54      阅读:173      评论:0      收藏:0      [点我收藏+]

标签:

在软件内部打开一个网页--不喜欢它没有办法返回,还需要再添加返回按钮==

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

export default class WebViewView extends React.Component {
    render() {
        var url = this.props.stateParams;
        return (
            <WebView
                ref="webview"
                automaticallyAdjustContentInsets={false}
                style={{backgroundColor:‘rgba(255,255,255,0.8)‘, height:350}}
                source={{uri:url}}
                javaScriptEnabled={true}
                domStorageEnabled={true}
                decelerationRate="normal"
                startInLoadingState={true}
            />
        )
    }
}

 

ReactNative学习-webView

标签:

原文地址:http://www.cnblogs.com/maoyazhi/p/5644622.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!