Disable recyclerview caching for lowend devices

This commit is contained in:
M66B 2020-08-30 16:16:16 +02:00
parent a2d30b1888
commit 18649082db
1 changed files with 4 additions and 1 deletions

View File

@ -509,7 +509,10 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
});
rvMessage.setHasFixedSize(false);
rvMessage.setItemViewCacheSize(10); // Default: 2
int threads = prefs.getInt("query_threads", 4);
if (threads >= 4)
rvMessage.setItemViewCacheSize(10); // Default: 2
//rvMessage.getRecycledViewPool().setMaxRecycledViews(0, 10); // Default 5
final LinearLayoutManager llm = new LinearLayoutManager(getContext()) {