I have a main DashboardActivity that uses a REST client to grab photos from a staging server. I found that when I would load the Bitmap from the server into an ImageButton it would throw a OutOfMemoryError. I solved this issue with using .skipMemoryCache() like so:
Picasso.with(this)
.load(imageUrl)
.skipMemoryCache()
.into(imageButton);
What would be some potential problems I would run into with this approach?
You should not use skipMemoryCache now, because it is deprecated. Here is some discussion about this method. Instead of using skipMemoryCache you should use memoryPolicy(MemoryPolicy policy, MemoryPolicy... additional).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With