I've been troubled by image rounding recently. Many methods on the Internet can round image corners normally. But when I use it, the rounded corners are a bit sharp, not smooth at all. I use Glide to get the image. Glide also has BitmapTransformation to expand and implement rounded corners, but the effect I show is not very good. In the end, I concluded that it is because Glide compresses the pixels of the image and reduces the resolution, resulting in poor rounded corners. I couldn't find a solution on the Internet, so I tried to find a solution myself. Without further ado, let's see the implementation.
This method is only suitable for pictures with small resolution. If the resolution is too high, the angle will not be round. 1. Customize ImageView and rewrite the ondraw method
3. Ok, that's it. The idea is to take the graphics within the rounded rectangle display range |
<<: Android design pattern singleton mode
>>: iOS: Let's talk about Designated Initializer
What are the criteria for choosing cabinet rental...
Q In addition to airplanes, where else can hydrog...
It is not uncommon for programmers to lose their ...
I don’t know if you have ever encountered this si...
Can an e-commerce business license be used to ope...
For marketers and businesses, advertising on Face...
Carrots are considered a healthy food in everyone...
1. Is Wenchang chicken the only chicken in Hainan...
Jaguar Land Rover CEO Ralf Speth said that by 202...
Author: Li Chenyang People leave traces behind, w...
"After launching this activity, the daily UV...
What products are good to sell in mini programs? ...
You may have heard of the subject of "quantu...
I believe everyone is familiar with "fingerp...