如何隐藏默认android webview进度条?



我在一个通过webview显示页面的应用上工作。我已经实现了我自己的进度条,它工作得很好。然而,我不能摆脱默认的安卓进度条,不断显示(三个灰点)。圆形进度指示器是我的,圆点是默认的。

的问题我的XML:

<?xml version="1.0" encoding="utf-8"?>
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
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"
tools:context=".MainActivity"
android:id="@+id/swipeLayout">

<ViewFlipper
android:id="@+id/simpleViewFlipper"
android:layout_width="match_parent"
android:layout_height="match_parent">
<WebView
android:id="@+id/splashWebview"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
<WebView
android:id="@+id/webview"
style="@android:style/Widget.Material.Light.WebView"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
<ProgressBar
android:id="@+id/progressBar"
style="?android:attr/progressBarStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
android:indeterminateTint="#000000"
android:layout_gravity="center_vertical|center_horizontal"
/>
</ViewFlipper>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>

我只使用id=webview的webview有这个问题。

在WebView中,加载网页时默认没有进度,您正在查看的三点进度必须来自您正在加载的网站

最新更新