mrzbn
mrzbn

Reputation: 665

How to prevent updating items that are loaded before in recyclerview?

I have a recyclerview which contains two view types. for one view type I want to prevent recyclerview from updating that item as it is loaded before and is costly. I have used this and I think its not related to my question. is there a way to achieve this?

Upvotes: 0

Views: 137

Answers (1)

mrzbn
mrzbn

Reputation: 665

I finally had to cache all views by this line:

recyclerView.setItemViewCacheSize(adapter.getItemCount())

but this may lead to bad performance.

Upvotes: 1

Related Questions