安卓学习8
安卓开发chrome内核浏览器实现原理:
app的build.gradle导入jar包
repositories {
maven { url ‘https://download.01.org/crosswalk/releases/crosswalk/android/maven2’}
}
添加依赖
implementation ‘org.xwalk:xwalk_core_library:23.53.589.4’
布局:
<org.xwalk.core.XWalkView
android:id="@+id/webview"
android:layout_width=“match_parent”
android:layout_height=“match_parent”
app:layout_constraintBottom_toBottomOf=“parent”
app:layout_constraintLeft_toLeftOf=“parent”
app:layout_constraintRight_toRightOf=“parent”
app:layout_constraintTop_toTopOf=“parent” />
代码实现:
参考https://blog.****.net/chy555chy/article/details/104428468