Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

对于比较复杂的headerview 向上滑动显示headerview的时候会出现抖动 #9

Closed
lytasky opened this issue Feb 18, 2016 · 6 comments

Comments

@lytasky
Copy link

lytasky commented Feb 18, 2016

对于比较复杂的headerview 向上滑动显示headerview的时候会出现抖动 ,请问你这边遇到过吗?比如headerview长达3屏

@lytasky
Copy link
Author

lytasky commented Feb 23, 2016

:看了下listview的源码 发现headerview 是一个fix view 不会参与recycle 所以headerview复杂的时候不会有任何影响 而recycleview本身并不支持headerview 所以内部没有做相关的特殊处理 这导致headerview过于复杂然后重新recycle显示的时候会卡顿

请问有什么解决办法吗?

@cundong
Copy link
Owner

cundong commented Feb 25, 2016

我看了你的邮件,我觉得你所说的复杂的View(长达三四屏),不适合用到Recycleview这种频繁回收的场景,可以考虑用其他方式实现,比如NestedScrolling机制。

@lytasky
Copy link
Author

lytasky commented Feb 25, 2016

嗯嗯 好的我去试试

@lytasky
Copy link
Author

lytasky commented Feb 25, 2016

还问下 listview加复杂header的话 不会出现卡顿 看了下源码 发现listview的 header不会被回收 是因为这个原因吗

@cundong
Copy link
Owner

cundong commented Feb 25, 2016

@lytasky
你说的ListView的HeaderView是否参与回收,我还没看源码,等我看了再来回答这个issue。

但是,RecyclerView本身不提供addHeader这种方法,HeaderAndFooterRecyclerView这个项目其实就是把Header和Footer当成普通的item来处理,所以你加上的headerView肯定会参与回收的,所以add一个太复杂的View是不适合的(太复杂的View也确实不应该增加到RecyclerView这种控件中,应该用其他方案开实现)。

@cundong cundong closed this as completed Mar 30, 2016
@XuQK
Copy link

XuQK commented Oct 5, 2018

@lytasky 兄弟,这个问题后来有解决吗。我现在也碰到了- -,不想用NestScrollView套RV,这样没法复用item呀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants