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

Naming collision with adapters extending thefuntasty/infinity #67

Open
vpratfr opened this issue Feb 14, 2017 · 2 comments
Open

Naming collision with adapters extending thefuntasty/infinity #67

vpratfr opened this issue Feb 14, 2017 · 2 comments

Comments

@vpratfr
Copy link

vpratfr commented Feb 14, 2017

A very useful complement to your library is https://github.com/thefuntasty/infinity

To use it, we need to extend from an adapter class of their own.

When we want to use both libraries, there is a name collision for the functions. The easy way to fix it would be to simply be more specific in the function names for your interface:

long getStickyHeaderId(int position);
T onCreateStickyHeaderViewHolder(ViewGroup parent);
void onBindStickyHeaderViewHolder(T viewholder, int position);

Would that be possible?

The current workaround is to use a generic ViewHolder as the template parameter for the interface, but that defeats the purpose of having a generic interface and forces you to make some ugly casts in code.

@starkej2
Copy link
Collaborator

starkej2 commented Feb 15, 2017

Definitely possible - I'll look into it, thanks!

@oshamahue
Copy link
Collaborator

I this would be a breaking change on upgrade. So we should be careful if we want to do this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants