Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi view type #1

Open
ddthanh198 opened this issue Apr 3, 2020 · 3 comments
Open

Multi view type #1

ddthanh198 opened this issue Apr 3, 2020 · 3 comments
Labels
good first issue Good for newcomers

Comments

@ddthanh198
Copy link

Cái MergeAdapter này không dùng được cho kiểu các item với các viewtype khác nhau xem kẽ nhau đúng không nhỉ, chỉ được với trường hợp hết item type này rồi mới đến item type khác

@hoc081098
Copy link
Member

@ddthanh198 chắc kiểu tuần tự rồi vì doc nó ghi "A new RecyclerView Adapter that can combine multiple adapters linearly." 👍

@royt93
Copy link

royt93 commented May 9, 2020

@hoc081098 @ddthanh198 Có cách nào dùng MergeAdapter này multi layout manager ko vậy bạn?
Vd merger adapter = listOf(adapterA, adapterB)
nhưng mình muốn hiển thị adapterA là list vertical, còn adapterB là dạng grid?

@hoc081098
Copy link
Member

@tplloi thì dùng GridLayoutMagager nhưng dùng spanSizeLookup để return spanCount cho từng item view type

@hoc081098 hoc081098 added the good first issue Good for newcomers label Jun 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants