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
The BMW X2 concept car was officially unveiled at...
Although Tesla has always been a leader in the fi...
Even if you have never heard of Li-Fi, you now kno...
Without fission, how can we achieve healthy user ...
...
[[429889]] The annual "Double Eleven" i...
Douyin became a huge hit like a bolt from the blu...
For a long time, the sudden disappearance of dino...
Driven by the trends of video mobility, informati...
Influenced by traditional Chinese culture, people...
Hello everyone, I am Chen Shiying, a nature conse...
In marketing , what emotional elements can we add...
Hi everyone, we meet again. Thank you all for you...
Today I want to write about my experience of aski...
Not long ago, my country used the Long March 7 ca...