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

ItemTypeAdapter 不支持 相同数据源,不同布局 #1

Closed
open9527 opened this issue Mar 7, 2023 · 3 comments
Closed

ItemTypeAdapter 不支持 相同数据源,不同布局 #1

open9527 opened this issue Mar 7, 2023 · 3 comments

Comments

@open9527
Copy link

open9527 commented Mar 7, 2023

ItemTypeAdapter 当使用相同数据源,不同布局UI的时候 是没效果的,

@czy1121
Copy link
Owner

czy1121 commented Mar 7, 2023

你是怎么用的?一个Item类型在同一列表中映射多个布局,需要Item类实现ItemSubtype,然后创建ItemType实例时传入subtype

@open9527
Copy link
Author

open9527 commented Mar 8, 2023

嗯,是我这边 item 没有实现ItemSubtype,实现ItemSubtype 是可以 同数据源不同UI

但是我发现 多类型创建 bindingType 的subtype这个字段 如果是需要在item中获取的话,是不方便的

你是怎么用的?一个Item类型在同一列表中映射多个布局,需要Item类实现ItemSubtype,然后创建ItemType实例时传入subtype

@czy1121
Copy link
Owner

czy1121 commented Mar 8, 2023

不明白你的需求。

这里提供了LayoutItemType和ViewItemType,如果不符合你的需求,你可以很轻松自己实现一个的

@czy1121 czy1121 closed this as completed Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants