alibaba / vlayout

Project vlayout is a powerfull LayoutManager extension for RecyclerView, it provides a group of layouts for RecyclerView. Make it able to handle a complicate situation when grid, list and other layouts in the same recyclerview.
http://tangram.pingguohe.net/
MIT License
10.8k stars 1.79k forks source link

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

Open gaohequan opened 7 years ago

gaohequan commented 7 years ago

使用的版本是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也可以正常显示。

longerian commented 7 years ago

需要排查一下。

huluwa-dev commented 7 years ago

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

maxcine13 commented 7 years ago

<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"/>

数据不能显示

gaohequan commented 7 years ago

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

huluwa-dev commented 7 years ago

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

gaohequan commented 7 years ago

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

huluwa-dev commented 7 years ago

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

Billxxxx commented 6 years ago

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

peerless2012 commented 6 years ago

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

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

triple-stone commented 6 years ago

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

RuanJH commented 6 years ago

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

qinhaonan commented 6 years ago

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

Lsy1992 commented 5 years ago

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

gaohequan commented 5 years ago

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

固定高度