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.
Source code:
____________________
❗ Subscribe to the channel:
⏯ Watch more tutorials:
⭐ Become a channel member for exclusive tutorials and other perks:
㊙ Help translating the videos:
💚 Support the content:
💬 Join the Discord chat:
🎧 Audiobooks and podcasts for programmers:
👶 How to get started with Android development:
📣 Follow Coding in Flow on social media:
Facebook:
Instagram:
Twitter:
Blog:
Nguồn: https://zagran-tour.com/
Xem thêm bài viết khác: https://zagran-tour.com/cong-nghe/
Xem thêm Bài Viết:
- Liên quân Reset Rank Mùa 12 ⭐ Trang Phục Miễn Phí Fennik Tay Đua F1 Mùa 14 Trải Nghiệm Game
- How to Reset Adobe Photoshop 2020 to Default Settings
- Reset Windows Server 2012/R2 Domain/Local Administrator Password
- Windows 10 – How to Reset Your Forgotten Windows 10 Password
- How to Fix Forgotten Windows 7 Password – Bypass Login Screen & Reset Password
sief Eldin sief abdo
•7 months ago
I really want thank you, u solve my problem by this video man ♥️♥️
Sanjay Bagora
•7 months ago
Can we compress image by 5mb to 100kb with Picasso
Jacob Lee
•7 months ago
Your inflated rectangle where I can see what you're doing is the cherry on top
Jacob Lee
•7 months ago
Subscribed <3 Thank you!
Programmer Ngidi
•7 months ago
java.lang.IllegalArgumentException: Target must not be null. but I did assign the image url
PAOLOSPORTING
•7 months ago
Thankyou!! Ever simple and useful.
G nikto
•7 months ago
Just the Best in Youtube. Everything is clear ,detailled with code . How i wish you made even more !
Abeel
•7 months ago
Thank you so much 🙂
how can I add blur?
Please
Stanislav Omelchenko
•7 months ago
It is so unfortunate that you need to use Android 9.0 and above for it. In general, the possibilities of Picasso Super. I like it. Thank you!
ian chu
•7 months ago
how can i put picasso in android studio? i already downloaded it from https://github.com/square/picasso
Harsh Barnwal
•7 months ago
I'm watching your every single video, even I don't need to because I know pretty much about Android development but I love watching your videos, your way of explaination and small details are always rocks🔥♥️
Singye pelthy
•7 months ago
i want to resize in the message image and it appears in full image as source but when i edit from layout it gives me the message gap which enlarge to image size gap.if anyone else have idea then i will be grateful.
Hitesh Chalise
•7 months ago
yes, adding large image into ImageView with small hardcoded width and height made the app very very slow.
Instead wrap content width and height & using picasso to resize like this solved the issue. Thanks. 🙂
Benjy Ronns
•7 months ago
Please make a video about resizing bitmaps in java
Muhammad Faisal
•7 months ago
how about resizing the image dynamically sir??
Misbah Rehman
•7 months ago
What if we want to view full screen size image?
Ash B
•7 months ago
Does it compresses image as well?
eyad
•7 months ago
Thank you for sum it up 😉