-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
Hi,
There's nothing wrong with the grid but when I click an item - say section 0, item 10 - the onClick action is triggered on section 0, item 0! I log the section and position and they're always correct. here's the onBindItemViewHolder method:
`public void onBindItemViewHolder(ItemViewHolder viewHolder, final int section, final int position) {
final SubjectViewHolder holder = (SubjectViewHolder) viewHolder;
Subject subject = subjects.get(section).get(position);
holder.tvName.setText(subject.getNameEn());
Glide.with(context)
.load(subject.isSelected() ? R.drawable.ic_star_selected : R.drawable.ic_star)
.into(holder.ivSelection);
holder.tvName.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Log.e("CLICK", "SEC: " + section + " POS: " + position);
Flubber.with()
.animation(Flubber.AnimationPreset.POP)
.duration(600)
.createFor(holder.tvName)
.start();
}
});`
How can I fix this?
Metadata
Metadata
Assignees
Labels
No labels