如何隐藏默认的Android WebView进度栏?
我在一个通过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.
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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在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