【发布时间】:2018-08-28 12:26:49
【问题描述】:
如何在 Android 中刷新 webview。里面有一个 webview iframe。 当我使用 NestedScrollView 时,它会无限滚动。 即使我正在检查 y 方向的滚动值,它总是给我 0 但实际上它的实际值不是 0。
布局:
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.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:id="@+id/swipeContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<RelativeLayout
android:id="@+id/nonVideoLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:windowSoftInputMode="adjustResize">
<WebView
android:id="@+id/home_activity_webView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:windowSoftInputMode="adjustResize"
app:layout_constraintDimensionRatio="1" />
</RelativeLayout>
</android.support.v4.widget.SwipeRefreshLayout>
【问题讨论】:
-
您的嵌套滚动视图问题在此链接中描述stackoverflow.com/questions/37775213/…
-
我知道这个问题及其原因,但我想知道如何解决这个问题。我阅读了很多帖子,但没有找到任何与我的问题相符的答案。
标签: android iframe android-webview swiperefreshlayout