Android WebView内部回收视图,滚动问题

Android WebView内部回收视图,滚动问题,android,html,webview,android-recyclerview,Android,Html,Webview,Android Recyclerview,我对回收视图项中的webView有问题。 点击YouTube视频或twitter帖子后,WebView会滚动到顶部。 以下是我的WebView项目布局: <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:animateLayoutChan

我对回收视图项中的webView有问题。 点击YouTube视频或twitter帖子后,WebView会滚动到顶部。 以下是我的WebView项目布局:

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:animateLayoutChanges="true">

<WebView
    android:id="@+id/postDetailItemWebView"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"/>

这是一个活动布局,回收商正在展示:

<android.support.design.widget.CoordinatorLayout 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"
android:fitsSystemWindows="true"
android:animateLayoutChanges="true">

<android.support.design.widget.AppBarLayout ..../>

<android.support.v7.widget.RecyclerView
    android:id="@+id/postDetailRecycler"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:overScrollMode="never"
    android:layoutAnimation="@anim/linear_recycler_anim"
    app:layout_behavior="@string/appbar_scrolling_view_behavior"/>

<RelativeLayout..../>


WebView的内容非常庞大,而且超过了屏幕大小,这就是它需要滚动的原因。我把它放在RecyclerView里面,因为我还有其他项目,比如:页眉和页脚。是否有任何修复方法,或者我必须将WebView放在RecyclerView外部作为全屏视图?

WebView支持滚动,不应该放在RecyclerView内部,请尝试将WebView放在你的RecyclerView外部

我在im.delight.android.WebView.AdvancedWebView上也遇到了同样的问题。我最终找到了解决办法。 这些选项帮助了我:

isFocusable = false
isFocusableInTouchMode = false

我希望他们也能帮助你。

你找到上面的解决方案了吗@安德夫