Giter Site home page Giter Site logo

Comments (6)

lytasky avatar lytasky commented on June 26, 2024

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

请问有什么解决办法吗?

from headerandfooterrecyclerview.

cundong avatar cundong commented on June 26, 2024

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

from headerandfooterrecyclerview.

lytasky avatar lytasky commented on June 26, 2024

嗯嗯 好的我去试试

from headerandfooterrecyclerview.

lytasky avatar lytasky commented on June 26, 2024

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

from headerandfooterrecyclerview.

cundong avatar cundong commented on June 26, 2024

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

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

from headerandfooterrecyclerview.

XuQK avatar XuQK commented on June 26, 2024

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

from headerandfooterrecyclerview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.