import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle; import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient; public class Main2Activity extends AppCompatActivity { private WebView webView; @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main2);
Intent intent = getIntent();
String url = intent.getStringExtra("key"); webView = findViewById(R.id.wv);
WebSettings settings = webView.getSettings();
settings.setJavaScriptEnabled(true);
settings.setJavaScriptCanOpenWindowsAutomatically(true);
//在本工程中显示网页,不去调用 系统浏览器
webView.setWebViewClient(new WebViewClient());
//加载网页
webView.loadUrl(url);
}
}

ViewpageWebview的更多相关文章

随机推荐

  1. with的上下文管理

    1.with with语句是在Python2.6中出现的新语句.在Python2.6以前要正确的处理涉及到异常的资源管理时,需要使用try/finally代码结构.如要实现文件在操作出现异常时也能正确 ...

  2. How to find out which version of tensorflow is installed in my pc? - 如何找出我的电脑中安装了哪个版本的 tensorflow?

    I'm using tensorflow and have got some weired issues. I'm told it might be related to the version of ...

  3. 数独游戏 js

    规则:玩家需要根据9×9盘面上的已知数字,推理出所有剩余空格的数字:保证每一行,每一列,每个宫的数字刚好含1-9,并且不重复. 一.步骤: 生成格子 ——  生成9×9满足规则的数字 ——  置空一定 ...

  4. 'weinre' 不是内部或外部命令,也不是可运行的程序 或批处理文件。 解决方案

    使用 npm install -g weinre 全局安装 weinre,weinre 安装目录是:C:\Users\Administrator\AppData\Roaming\npm 需要配置环境变 ...

  5. 21. Merge Two Sorted Lists★

    题目内容:Merge two sorted linked lists and return it as a new list. The new list should be made by splic ...

  6. h264文件分析(纯c解析代码)

    参考链接:1. 解析H264的SPS信息 https://blog.csdn.net/lizhijian21/article/details/80982403               2. h.2 ...

  7. [工控安全]西门子S7-400 PLC固件逆向分析(一)

    不算前言的前言:拖了这么久,才发现这个专题没有想象中的简单,学习的路径大致是Step7->S7comm->MC7 code->firmware,我会用尽量简短的语言把前两部分讲清楚, ...

  8. linux运维工作内容及岗位要求

    什么是Linux?大家日常使用电脑听歌.打游戏娱乐或处理日常工作时,接触到最多的就是Windows操作系统,电脑如果不安装Windows系统是无法进行娱乐和工作的,所有的软件程序都必须运行在操作系统之 ...

  9. ubuntu16.04运行ros的时候编译工作空间catkin_make出现的一个问题Could not find a package configuration file provided by

    最近在进行ros里面的gazebo仿真之前需要对自己创建的工作空间进行编译,但是进行编译的时候输入catkin_make出现如下错误提示 查阅ROS问答社区之后发现两个比较有用的链接,如下 https ...

  10. python实际练习1——简单购物车

    要求实现 启动程序后,让用户输入工资,然后打印商品列表 允许用户根据商品编号购买商品 用户选择商品后,检测余额是否够,够就直接扣款,不够就提醒 可随时退出,退出时,打印已购买商品和余额 自己写的代码是 ...