最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Android让用户选择打开自定义浏览器

运维笔记admin6浏览0评论

背景

最近在自学Android, 看到WebView这里, 打算做一个简陋的自定义浏览器(其实就是Activity + WebView),并实现点击入口按钮谈出系统提示框,让用户选择程序打开网页功能。刚开始一直都是直接调用系统浏览器打开,无比郁闷,直到……

折腾过程

activity_browse.xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android/apk/res/android"
    xmlns:tools="http://schemas.android/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.john.mydemo.BrowseActivity">

    <WebView
        android:id="@+id/my_webview"
        android:layout_width="match_parent"
        android:layout_height=
发布评论

评论列表(0)

  1. 暂无评论