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

Different layout is not supported in UltimateViewAdapter? #35

Closed
sachil opened this issue May 8, 2015 · 5 comments
Closed

Different layout is not supported in UltimateViewAdapter? #35

sachil opened this issue May 8, 2015 · 5 comments

Comments

@sachil
Copy link

sachil commented May 8, 2015

I try to create an adapter which extends UltimateViewAdapter,and I want to load different layout file.So I overwrite the function:getItemViewType(),but I find out that the function:onCreateViewHolder() only have one paramater,not contain viewType.
Please give me some suggesttions,thanks a lot.

@sergii-frost
Copy link

Hi, first of all Thanks! You are doing a great job with this lib!
I was using SuperRecyclerView before, and now wanted to switch to UltimateRecyclerView as it has more nice features I need. Currently this issue prevents me from switching to UltimateRecyclerView as I need to support different layouts in my RecyclerView. Could you please advice any workarounds for now? I tried testing app quickly with public void setAdapter(Adapter adapter) method which is deprecated now, it works, but I am loosing all the benefits :( of the view. I would be happy to hear any suggestions of how to solve this issue.

@cymcsg
Copy link
Owner

cymcsg commented May 15, 2015

Thank you for giving such useful advice.I'll try to support different layout in UltimateViewAdapter and I hope someone can help me to perfect the project.

@jjhesk
Copy link
Collaborator

jjhesk commented May 15, 2015

You will need these setups on the base or you can just include the library into this project. It is just up to your decision.

On the implementation, you need to let user to design their own type as written in sample and there is better to support the default viewType as from google AdMob.

This was referenced May 19, 2015
@cymcsg
Copy link
Owner

cymcsg commented May 25, 2015

In the latest version of UltimateRecyclerview, there is a UltimateDifferentViewTypeAdapter which can help use different viewholder in an adapter . I think it could help you about the problem.

@cymcsg cymcsg closed this as completed May 25, 2015
@sachil
Copy link
Author

sachil commented May 26, 2015

OK,I will have a try,thank you very much!

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

4 participants