Closed homedevs closed 8 years ago
Hi,
Every cell might be clickable or not, it's up to the user of the library.
Regarding the position, there is no such thing as first or second item in the context of the library. Positions are determined by a pair (section, row)
. If you have further comments, you need to provide more information on how you are using the library so that I can help.
Thank you for the the response. I am trying to get position of particular item.
What exactly I want ,
I would like to have RV click listener which should return section index as well as position of item reside in the section.
Is there any way ?
Example,
consider this kind or RV :
https://github.com/truizlop/SectionedRecyclerView/blob/master/art/screenshot2.png
Now I would like to have position of Basket Match ,
Well , It should be SECTION 1, ITEM 0
I think this is out of the scope of the library and something you can do. In the method onBindItemViewHolder(VH holder, int section, int position)
you are supposed to bind the click listener to the view. At that point, you have access to section and position numbers, which you can keep track of.
Thank you so much. Thats a perfect solution . Thank you.
Isn't that a bad idea? http://stackoverflow.com/a/33845951/3416786 How should I go about binding it in onCreateItemViewHolder
You can still create a single click listener in onCreateItemViewHolder and pass section and position in onBindItemViewHolder
Hi,
I am using common available method to get recycleview items. I have noticed 2 things here.
What is solution ?