Code Monkey home page Code Monkey logo

Comments (5)

DevAhamed avatar DevAhamed commented on July 18, 2024 1

Thanks for clarifying.

LayoutManagers are set to the recyclerview. So unfortunately, this library doesn't support the use case of multiple layout managers.

from multiviewadapter.

JGeraldoLima avatar JGeraldoLima commented on July 18, 2024

I've already tried to use setSpanCount for the section objetcs, but nothing happens. Also, tried to override getSpanSize, but this does not make a difference too :/

from multiviewadapter.

DevAhamed avatar DevAhamed commented on July 18, 2024

Hi,

GridLayoutManager supports only the column count (span) and doesn't consider the row count. Even StaggeredGridLayoutManager will not help in this case. You need to build your own layout manager. You can take look here for some inspiration - https://lucasr.org/2014/07/31/the-new-twowayview/

As far as the library is concerned, span concept is based upon the default layout managers. But if you create/use a custom layout manager, you can extend the library classes and use it.

from multiviewadapter.

JGeraldoLima avatar JGeraldoLima commented on July 18, 2024

Actually, my question was: can I, somehow, use a LayoutManager for sections and a different one for ListSections? If so, that would solve my problem, I could use LinearLayoutManager or GridLayoutManager for sections and SpannedGridLayoutManager for section items!

from multiviewadapter.

JGeraldoLima avatar JGeraldoLima commented on July 18, 2024

Oh, that's a shame :/

But thank you very much anyway, that's a great library!

from multiviewadapter.

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.