Home > Blockchain >  How to hide the default android webview progress bar?
How to hide the default android webview progress bar?

Time:05-14

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.

CodePudding user response:

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

  • Related