DevAhamed / MultiViewAdapter

Easily create complex recyclerview adapters in android
https://devahamed.github.io/MultiViewAdapter
Apache License 2.0
818 stars 148 forks source link

Is it possible to use different layout managers with multiview adapter? #77

Closed Subroid closed 5 years ago

Subroid commented 5 years ago

Please complete the following information:

DevAhamed commented 5 years ago

Yes, you can use any layout manager with MultiViewAdapter library.

Subroid commented 5 years ago

I mean to ask is it possible to use multiple layout managers for multiple list sections?

DevAhamed commented 5 years ago

Which layout managers you want to use?

Subroid commented 5 years ago

I want to have multiple list sections in my home screen. It is an ecommerce app so there will be sections like recommended for you, popular etc list in home screen so I want to use sometimes Linear Layout Mangager for some sections and sometimes Grid Layout Mangager for some sections.

DevAhamed commented 5 years ago

If thats the case, you can use GridLayoutManager and set different span count to each section. This is showcased in sample app. You can download the sample app from here : https://play.google.com/apps/testing/dev.ahamed.mva.sample

Switch to 'Advanced' in sample app. You can see that there are different sections inside the single adapter with different span count.