I want to set my view holder to not recycle, here's the code:
@Override
public void onBindViewHolder(final ViewHolder viewHolder, final int position) {
viewHolder.setIsRecyclable(false);
}
However, when I see the documentation here: https://developer.android.com/reference/androidx/recyclerview/widget/RecyclerView.ViewHolder#setIsRecyclable(boolean), it is written that the setIsRecycleable() should always be paired and I have no idea about this. Can anybody provide a sample code for this case? When should I call the setIsRecyclable(true) again? Thanks.