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
Speaking of anorthoclase, I believe most people a...
At present, the automobile industry is facing unp...
On October 3rd this year, KotlinConf 2018, the Ko...
Screen: Sound Effects: operate: Plot: Experience:...
Testing applications is very cumbersome. Where ca...
During the peak travel season at the end of the y...
How to define "SEO thinking" Generally ...
Baidu bidding is a good thing. It can be said tha...
Are you suffering from unreasonable complaints, c...
As we all know, the advertising industry has a hi...
After launching the product into the market and g...
recently The "local specialties" brough...
Written by Wei Shuihua Header Image | A Flavour o...
How can a new product gain a large number of foll...
Keyword promotion means that when users search us...