Giter Club home page Giter Club logo

Comments (9)

drakeet avatar drakeet commented on July 29, 2024

I guess your GridRecyclerViewItem height is wrap_content, and it will cause the sub RecyclerView load all its items so that causes the block.

from multitype.

drakeet avatar drakeet commented on July 29, 2024

There are two ways to solve the issue:

  • Change the sub RecyclerView to flat items, and a item layout looks like this:
    image
  • Use GridLayoutManager and setSpanSizeLookup with MultiType, the MultiType does not specify that it must use LinearLayoutManager.

from multitype.

drakeet avatar drakeet commented on July 29, 2024

Wait a moment, I will write a sample with the second way for you.

from multitype.

drakeet avatar drakeet commented on July 29, 2024

OK, I have achieved it:

from multitype.

drakeet avatar drakeet commented on July 29, 2024

And the performance is great! I am uploading the source...

from multitype.

drakeet avatar drakeet commented on July 29, 2024

The multi-grid sample:

https://github.com/drakeet/MultiType/tree/master/sample/src/main/java/me/drakeet/multitype/sample/grid

from multitype.

drakeet avatar drakeet commented on July 29, 2024

And you are right, there is no big difference with the normal adapter because the MultiType is lite originally but flexible and powerful.

from multitype.

zubinxiong avatar zubinxiong commented on July 29, 2024

Actually I already do the same effect like your suggestions2, it's same as your new sample. but I think there is no difference with origin adapter,so I just open the issues to ask for your options about the reason why you design like that,I guess maybe you didn't want to change the way to use adapter,but maybe a little encapsulates will more direct, it's the different opinions with you .

And thanks for your answers and sample, it will also help other person

from multitype.

drakeet avatar drakeet commented on July 29, 2024

The only difference is you do not need to dispatch the view types and View Holders by yourself , MultiTypeAdapter will do that.

from multitype.

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.