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
Every day when we enter and leave residential are...
This Tuesday, Apple pushed an update to the offic...
Women's Day is not a big festival in the year...
Regarding fission, let me explain to you here how...
Recently, the plant paleoecology team led by Prof...
CICC said that the Ministry of Industry and Infor...
I read in the news that the first batch of fully ...
In recent years, the state has been increasing th...
When the machine starts, the garbage in the blood...
Autonomous driving is an important part of the up...
Author: Zheng Xin, Wang Weicong, Bai Hua As a res...
Introduction to CQRS Architecture You should all ...
Today (October 20) is the 27th World Osteoporosis...
This article is transferred from: Channel Help Sh...
In 2020, it seems that the main players in UI dev...