My app uses a firebase RecyclerAdapter to display 'plant' entities in an activity. I made it so that if I longclick on an entity displayed in Cardview format using a ViewHolder and
Solution 1:
The position and model are final on the onBindViewHolder method
The viewholder can be final, but not the data or the position
Use holder.getAdapterPosition() to get the position inside annonymous interfaces like click listeners
And then get the data using getItem() method from the adapter class
Share
Post a Comment
for "Firebase Recycleradapter Displaying Wrong Information Android"
Post a Comment for "Firebase Recycleradapter Displaying Wrong Information Android"