一、概述
先说一下实现的几个方面 ,显示是内置浏览器打开网页,然后在是WebView打开网页,在了就是调用内置的htnl文件呈现,最后是WebView呈现的适配问题。
使用手机内置浏览器打开网页
还是先上效果图
由于拿的测试机是平板所以呈现出来不是特别的美观,但是功能实现是没问题的,就是打开一个百度的页面。
代码附上 activity.xml
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orienta