如何隐藏默认的Android WebView进度栏?

发布于 2025-01-29 00:13:28 字数 1778 浏览 1 评论 0原文

我在一个通过WebView显示页面的应用程序上工作。我已经实施了自己的进度栏,而且效果很好。但是,我无法摆脱不断出现的默认Android进度栏(三个灰点)。回合进度指示器是我的点是默认值。

问题

我的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>

我只有web view的问题,webview = webview。

i work on an app that displays a page through a webview. I have implemented my own progress bar and it works fine. However i cannot get rid of the default android progress bar that keeps showing up (the three gray dots). The round progress indicator is mine the dots are the default.

The problem

My 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>

I only have this problem with the webview with id=webview.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

最终幸福 2025-02-05 00:13:28

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

In WebView there is no progress by default while loading the web page, the three-dot progress that you are viewing must be from the website which you are loading

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文