vlayout icon indicating copy to clipboard operation
vlayout copied to clipboard

您好,recyclerView 外层嵌套NestedScrollView无法正常显示。

Open gaohequan opened this issue 7 years ago • 14 comments

使用的版本是1.0.7@aar 代码是<android.support.v4.widget.NestedScrollView android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <android.support.v7.widget.RecyclerView android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/headRecycler" android:nestedScrollingEnabled="false"/> </LinearLayout> </android.support.v4.widget.NestedScrollView> 这种情况下recycler使用OnePlusNLayoutHelperEx 6个的情况下无法正常显示 需要将recyclerView给出固定高度比如android:layout_height="500dp". 或者将NestedScrollView换成ScrollView也可以正常显示。

gaohequan avatar Jun 21 '17 02:06 gaohequan

需要排查一下。

longerian avatar Jun 22 '17 02:06 longerian

遇到了同样的问题。。。希望能修复。

huluwa-dev avatar Jun 28 '17 01:06 huluwa-dev

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/activity_main" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.sandu.layout.MainActivity">

<android.support.v7.widget.RecyclerView
    android:id="@+id/recycler"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"/>
数据不能显示

maxcine13 avatar Jul 03 '17 09:07 maxcine13

大哥们 谁解决这个问题了?

gaohequan avatar Sep 19 '17 09:09 gaohequan

我换成BRVAH了,满足我的需求了。不卡了。

huluwa-dev avatar Sep 19 '17 09:09 huluwa-dev

@EricInCD 不太明白,BRVAH.能具体解释一下吗?

gaohequan avatar Sep 20 '17 00:09 gaohequan

@gaohequan BRVAH是另外一个RecyclerView库,可以灵活配置,用着挺顺手的。不过我也没有再用NestedScrollView嵌套了。

huluwa-dev avatar Sep 20 '17 02:09 huluwa-dev

同样遇到该问题 希望能处理

Billxxxx avatar Feb 05 '18 04:02 Billxxxx

同遇到此问题,系统默认的LayoutManager+Adapter无问题。

目前暂时解决方案是手动计算然后设置给RecyclerView

peerless2012 avatar Mar 31 '18 05:03 peerless2012

同遇到此问题,系统默认的LayoutManager+Adapter无问题

triple-stone avatar Apr 03 '18 08:04 triple-stone

可以提供解决方案嘛?需要动态计算VirtualLayoutManager的高度呢,还是里面helper的高度?

RuanJH avatar Jul 17 '18 09:07 RuanJH

recyclerview嵌套recyclerview ,内部recyclerview 高度计算有问题,不显示, (不知道具体原因,求大佬解释.) 我目前的解决方案: 1,内部recyclerview设置固定高度 2,在约束布局设置内部recyclerview宽高比, 3,内部的recyclerview 使用 google的layoutManager(禁止滚动)和adapter

qinhaonan avatar Sep 27 '18 10:09 qinhaonan

这个问题现在有什么好的办法吗?

Lsy1992 avatar May 16 '19 08:05 Lsy1992

这个问题现在有什么好的办法吗?

固定高度

gaohequan avatar May 23 '19 01:05 gaohequan