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
Editor’s Note: The recent hit of "The Wander...
Dagger and Koin are undoubtedly the two most popu...
Recently, epidemics have occurred in many places i...
As the leader of the third-party application mark...
In 2016, Qihoo and Dasheng were gradually no long...
Smartphone sales in the first quarter were dismal...
[[153289]] Forbes Online published an article say...
Recently, Chen Zuhua, a citizen of Nanchang City,...
The examination process may be very uncomfortable...
Faced with more than 60 known elements, all chemi...
Since Foxconn took over Sharp in August last year...
Source code introduction Similar to 360 mobile as...
Industrial AI (AI), the application of artificial...
There is no doubt that the topic of mini programs...
The video, created by Terence Tuhinanshu, shows a...