UIL, Picasso - Images in adapter always reload when stop scrolling

前端 未结 2 1740
野趣味
野趣味 2021-02-20 07:39

I have ListView with text and large image from internet. My image item has fit width and wrap_content height.
I tried to display image in background with

2条回答
  •  鱼传尺愫
    2021-02-20 08:13

    Maybe your memory cache size is small and Picasso tries to load images from disc cache. Please check here for deciding cache size. You can try to increase cache size of Picasso by:

    Picasso p = new Picasso.Builder(context)
    .memoryCache(new LruCache(cacheSize))
    .build();
    

    However in my opinion your app looks like having an endless feed. Which means your memory cache will be full at some time and you'll have to use disc cache. Retrieving data from the disc cache is slower compared to memory cache.

提交回复
热议问题