-
Notifications
You must be signed in to change notification settings - Fork 554
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
[Question] Get position of item in section #463
Comments
Hi @IonutNegru87, thanks for the question and compliments. The adapter has |
Hello @davideas, I've tried What I did for now is to store an Your recommendation with the difference between the position of the header and the item is working great.
This is implemented in the my If you have any other ideas on how to optimize this, it would be great. Maybe at some point this functionality can be embedded directly in the adapter(even though it has an very specific use-case). Thank you again for your great work and for the help on this issue. |
Yes, it can be embedded, I keep this open for the modification. |
Thank you for your support and for your great job :) |
Hello, I'm using this directly in AbstractSectionableItem#bindViewHolder(FlexibleAdapter adapter, ItemViewHolder holder, int position, List payloads). It is not a major issue, but could create consistency problems in the future. Best regards and keep up the good work. |
Thank you @IonutNegru87, well in this case, I cannot provide the type (I don't have it), however the declared type is for sure the most common one and all in the end extends You can suppress the warning. |
@davideas , |
Hello,
First of all I want to say this is a great library which offers many nice features and additions in comparison to the default RV.
My use case is a little specific, but I want to check if there is an feature like this already implemented or if I have to manually do it.
I need to get the position of an item, relative to it's section. For example:
Header0
Item 1
Item 2
Header1
Item 3
The title of my items depends on their position in the section. Currently I do not have an way to get the position of an item relative to it's section, thus it displays:
Header0
Item1
Item2
Header3
Item4
Is there an functionality like this already implemented? Or do you recommend any way to do it?
I need to do this directly in the ItemHolder I use, when binding the view holder.
Thank you.
The text was updated successfully, but these errors were encountered: