Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable the drawing cache?

I'm using a ListView to show plenty of images (endless scrolling). When I start to scroll down the list this messages floods the logcat:

WARN/View(15722): View too large to fit into drawing cache, needs 1639680 bytes, only 1536000 available

I'm having trouble to understand the drawing cache mechanism but it seems to be enabled by default as I did not enable it. I assume it would be better to disable it because it produces hundreds of warnings within seconds. But I've got no idea which view is actually causing this issue. I tried to apply setDrawingCacheEnabled(false) to all involved views but the issue remained.

like image 456
Taig Avatar asked Feb 18 '23 19:02

Taig


1 Answers

Applying setScrollingCacheEnabled( false ) to the ListView did the trick.

like image 114
Taig Avatar answered Feb 20 '23 10:02

Taig