Android ScrollView与 X5Webview+RecyclerView的滑动冲突解决

 要解决ScrollView嵌套的X5WebView。滑动、高度冲突,则首先要解决ScrollView与 X5Webview的滑动冲突,
<ScrollView
    android:layout_width="match_parent"
    android:layout_height="0dp"
    android:layout_weight="1">

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

        <RelativeLayout
            android:id="@+id/rec"
            android:layout_width="match_parent"
            android:scrollbars="none"
            android:layout_height="wrap_content">

            <FrameLayout
                android:id="@+id/webView1"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:scrollbars="none" />
        </RelativeLayout>

        <TextView
            android:id="@+id/logView1"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@id/rec"
            android:singleLine="false"
            android:text="前面不重要,关键是开源的,还能解决我们开发中的一些问题和需求,举个例子:QQ浏览器独立小窗播放视频的功能,还有WebView播放原生H5Video难以很好解决的全屏播放问题~~...前面不重要,关键是开源的,还能解决我们开发中的一些问题和需求,举个例子:QQ浏览器独立小窗播放视频的功能,还有WebView播放原生H5Video难以很好解决的全屏播放问题~~...前面不重要,关键是开源的,还能解决我们开发中的一些问题和需求,举个例子:QQ浏览器独立小窗播放视频的功能,还有WebView播放原生H5Video难以很好解决的全屏播放问题~~...前面不重要,关键是开源的,还能解决我们开发中的一些问题和需求,举个例子:QQ浏览器独立小窗播放视频的功能,还有WebView播放原生H5Video难以很好解决的全屏播放问题~~...前面不重要,关键是开源的,还能解决我们开发中的一些问题和需求,举个例子:QQ浏览器独立小窗播放视频的功能,还有WebView播放原生H5Video难以很好解决的全屏播放问题~~...前面不重要,关键是开源的,还能解决我们开发中的一些问题和需求,举个例子:QQ浏览器独立小窗播放视频的功能,还有WebView播放原生H5Video难以很好解决的全屏播放问题~~...前面不重要,关键是开源的,还能解决我们开发中的一些问题和需求,举个例子:QQ浏览器独立小窗播放视频的功能,还有WebView播放原生H5Video难以很好解决的全屏播放问题~~..."
            android:visibility="visible" />

        <RelativeLayout
            android:layout_below="@id/logView1"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <android.support.v7.widget.RecyclerView
                android:id="@+id/recy"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"/>

        </RelativeLayout>

    </RelativeLayout>
</ScrollView>

 

注意:在添加↓ Webview的时候,把滑动冲去掉,在外层加上relativelayout

<RelativeLayout android:id="@+id/rec"

android:layout_width="match_parent" android:scrollbars="none"

android:layout_height="wrap_content">

<FrameLayout android:id="@+id/webView1" android:layout_width="match_parent"

android:layout_height="wrap_content" android:scrollbars="none" />

</RelativeLayout>

 

而RecyclerView 则在外层加上

<RelativeLayout

android:layout_below="@id/logView1"

android:layout_width="match_parent" android:layout_height="wrap_content">

<android.support.v7.widget.RecyclerView

android:id="@+id/recy" android:layout_width="match_parent"

android:layout_height="wrap_content"/>

</RelativeLayout>

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值