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
A must-learn for Pinduoduo merchants to open a st...
As the weather gets hotter, has your blood been r...
Data Brother teaches Qianchuan practical online a...
Every February 2nd, North America welcomes the tr...
As the Qingming Festival approaches, the local ep...
Isn’t it that product sales have encountered a bo...
1 Behind the TikTok phenomenon As of mid-June 201...
This is the most unfamiliar scenery in Sichuan, a...
The development of mobile phones has driven the de...
Spring is here and it’s time to go out for an out...
The numbers that seem simple to modern people are...
Just as overseas companies such as Apple and Goog...
Next, let’s take a look at the first article . 1....
Currently, AI has become a hot topic in the indus...