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

UltimateDifferentViewTypeAdapter is difficult to use #469

Open
sandeep-voxer opened this issue Aug 3, 2017 · 0 comments
Open

UltimateDifferentViewTypeAdapter is difficult to use #469

sandeep-voxer opened this issue Aug 3, 2017 · 0 comments

Comments

@sandeep-voxer
Copy link

Can you please add a constructor which requires the developer to pass in the enum to data binder map? Otherwise, it's not obvious to the developer that they have to add Enum to data binder mappings for the adapter to work correctly.

UltimateDifferentViewTypeAdapter is a subclass of UltimateViewAdapter which seems to be designed only for single view type holder - so it has an abstract method onCreateViewHolder(parent) , which is not applicable at all for multiple view types! For multiple view types, unless you know the position, you don't know which type of ViewHolder to create and return, and this is only known to the DataBinder!

Also, it doesn't seem to make sense for each DataBinder to have methods like notifyItemRangeInserted() etc. That seems like something that should be part of the overall adapter and not a per-ViewType operation.

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

1 participant