当前位置:网站首页>Webview中的超链接点击到外部浏览器打开
Webview中的超链接点击到外部浏览器打开
2022-07-30 07:27:00 【xiyangyang8110】
mWv.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
//目的是要让我们应用自己来加载网页,而不是交给浏览器
// view.loadUrl(url);
Intent intent = new Intent();
intent.setAction("android.intent.action.VIEW");
Uri content_url = Uri.parse(url);
intent.setData(content_url);
startActivity(intent);
return true;
}
});
或者直接注释掉本方法,默认跳到外部浏览器打开
边栏推荐
- typescript5-编译和安装ts代码
- typescript7-typescript common types
- How to calculate the daily cumulative capital flow one by one in real time
- 潜心打磨,主动求变——这群技术排头兵,如何做好底层开发这件事?
- JS中如何阻止事件冒泡和默认行为
- Limit injection record of mysql injection in No. 5 dark area shooting range
- Kubernetes 在科技革命中的演变
- typescript6-简化运行ts的步骤
- What convenience does the RFID fixed asset inventory system bring to enterprises?
- ES:解构
猜你喜欢

Architectural Design Guide How to Become an Architect

The blockbuster IP that has been popular in the world for 25 years, the new work has become a script paradise

WinForm(一):开始一个WinForm程序

typescript4 - installs a toolkit for compiling ts

SQL window function

MagicDraw secondary development process

Mybitatis related configuration files

C language custom types, rounding

hicp第六天

hcip第八天
随机推荐
基于SSM实现高校后勤报修系统
电脑文档误删除怎么恢复,恢复误删除电脑文档的方法
SQL substring_index() usage - MySQL string interception
Interview with Ant: How do these technology pioneers do the bottom-level development well?| Excellent technical team interview
Keil compile size and storage instructions
typescript1 - what is typescript
开创ETC生态建设新格局 JASMINER新一批X4服务器陆续发出
typescript6 - simplify the steps to run ts
你好,我的新名字叫 “铜锁 / Tongsuo”
What convenience does the RFID fixed asset inventory system bring to enterprises?
OA项目之待开会议&历史会议&所有会议
SQL的substring_index()用法——MySQL字符串截取
【Codeforces Round #805 (Div. 3)(A~C)】
C# 获取系统已安装的.NET版本
Distributed lock development
2022牛客暑期多校训练营3(ACFGJ)
typescript8 - type annotations
elk报错:[syslogs] index has exceeded [1000000]
谷粒商城--环境部署(2022/7/28最新)
[GAN]老照片修复Bringing Old Photos Back to Life论文总结