Picasso Resizing & Scaling – Android Studio Tutorial
If we just load in image from a url into an ImageView without further resizing, Picasso will load the full sized, high resolution image into the device’s memory and scale it down to the ImageView’s size. This leads to unnecessary memory consumption. In this video we will learn how to use the resize, resizeDimen and fit methods to resize the loaded image properly, how to keep the correct aspect ratio and how to crop and scale the image with centerCrop and centerInside. We will use pixel units, density independent pixels (dp/dips) and dimension resouces.
Code for this video:
https://gist.github.com/codinginflow/a63ae1875e62dbc7d3a0ab091aed593b
____________________
💻 Find the BEST programming tutorials on TutHub:
https://tuthub.io
⭐ Get my MVVM Caching Course now:
https://codinginflow.com/caching
❗ Subscribe to the channel:
https://www.youtube.com/c/codinginflo…
📨 Subscribe to the Coding in Flow newsletter:
https://codinginflow.com/newsletter
❓ Join our free developer community:
https://discord.gg/TSnMvmc
📣 Follow Coding in Flow on other sites:
Facebook: https://www.facebook.com/codinginflow
Instagram: https://www.instagram.com/codinginflow
TikTok: https://www.tiktok.com/@codinginflow
Twitter: https://twitter.com/codinginflow
Github: https://github.com/codinginflow
💰 Business requests, sponsoring, etc.: info@codinginflow.com
Views :34226
android studio