https://github.com/Justson/AgentWeb
build.gradle(Moudle.app)androidx的引用
implementation 'com.just.agentweb:agentweb-androidx:4.1.4'
如果项目中h5需要选择图片或者是下载需要添加一下依赖
implementation 'com.just.agentweb:filechooser:4.1.4'// (可选)
implementation 'com.download.library:Downloader:4.1.4'// (可选)
如果添加选择图片或下载报错,需要添加一下配置build.gradle(Project:项目名称)
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
布局的实现
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
//标题
layout="@layout/activity_left_title_text_view"/>
android:id="@+id/view"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
kotlin实现案例
import android.net.http.SslError
import android.os.Bundle
import android.view.KeyEvent
import android.view.View
import android.view.ViewGroup