最新消息: USBMI致力于为网友们分享Windows、安卓、IOS等主流手机系统相关的资讯以及评测、同时提供相关教程、应用、软件下载等服务。

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

业界 admin 2浏览 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=

背景

最近在自学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. 暂无评论