Comments (6)
:看了下listview的源码 发现headerview 是一个fix view 不会参与recycle 所以headerview复杂的时候不会有任何影响 而recycleview本身并不支持headerview 所以内部没有做相关的特殊处理 这导致headerview过于复杂然后重新recycle显示的时候会卡顿
请问有什么解决办法吗?
from headerandfooterrecyclerview.
我看了你的邮件,我觉得你所说的复杂的View(长达三四屏),不适合用到Recycleview这种频繁回收的场景,可以考虑用其他方式实现,比如NestedScrolling机制。
from headerandfooterrecyclerview.
嗯嗯 好的我去试试
from headerandfooterrecyclerview.
还问下 listview加复杂header的话 不会出现卡顿 看了下源码 发现listview的 header不会被回收 是因为这个原因吗
from headerandfooterrecyclerview.
@lytasky
你说的ListView的HeaderView是否参与回收,我还没看源码,等我看了再来回答这个issue。
但是,RecyclerView本身不提供addHeader这种方法,HeaderAndFooterRecyclerView这个项目其实就是把Header和Footer当成普通的item来处理,所以你加上的headerView肯定会参与回收的,所以add一个太复杂的View是不适合的(太复杂的View也确实不应该增加到RecyclerView这种控件中,应该用其他方案开实现)。
from headerandfooterrecyclerview.
@lytasky 兄弟,这个问题后来有解决吗。我现在也碰到了- -,不想用NestScrollView套RV,这样没法复用item呀
from headerandfooterrecyclerview.
Related Issues (20)
- 即将滑动到底的时候,会自动滑动到底部显示正在加载的footerview,非常不友好的体验 HOT 1
- headview 需要自己设置layoutparams才能填充父布局 HOT 1
- 没有gradle引用? HOT 1
- remove the Footer then add a new Footer then the footer state can not be refresh!
- 加载下一页的回调,在不停快速划动的情况下会触发多次
- 添加多个HeaderView 会出现问题?headerView 会重复出现在 footView 上
- 添加多个headerView 删除的时候 只能删除最后添加的那个 ?
- 外部添加scollerview就无法实现下拉加载了 HOT 1
- 不能添加多个header和footer HOT 1
- 会影响内部Adapter的ItemType
- 加载第一页 会向上跳动 这是什么原因? HOT 3
- EndlessLinearLayoutActivity 横向加载有问题。 HOT 1
- HeaderAndFooterAdapter中oncreateViewHolder中的viewType怎么来的
- Headview TranslateAnimation Problem
- 瀑布流布局第一次加载更多时footer在最左边没居中 HOT 4
- 添加多个header产生布局问题 HOT 1
- 局部刷新失效
- 下拉刷新
- 给head布局添加点击事件无效
- 网络错误时footer点击事件无效
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from headerandfooterrecyclerview.