Fixed webview starting in the middle of a new page

This commit is contained in:
Jay 2020-01-15 00:17:40 -08:00
parent c476112266
commit 47bfeddb05
2 changed files with 6 additions and 1 deletions

View file

@ -146,7 +146,11 @@ class WebViewActivity : BaseActivity() {
override fun onPageStarted(view: WebView?, url: String?, favicon: Bitmap?) {
super.onPageStarted(view, url, favicon)
invalidateOptionsMenu()
//swipe_refresh.isEnabled = false
}
override fun onPageCommitVisible(view: WebView?, url: String?) {
super.onPageCommitVisible(view, url)
nested_view.scrollTo(0,0)
}
}
val marginB = webview.marginBottom

View file

@ -32,6 +32,7 @@
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<androidx.core.widget.NestedScrollView
android:id="@+id/nested_view"
android:layout_width="match_parent"
android:layout_height="match_parent">