RoundedBitmapDrawable bitmapDrawable = RoundedBitmapDrawableFactory.create(view.getContext().getResources(), bitmap); bitmapDrawable.setCornerRadius(finalRadius); // 圆角
bitmapDrawable.setCircular(true); // 圆形 imageView.setImageDrawable(bitmapDrawable);
圆角 RoundedBitmapDrawable
最新推荐文章于 2024-04-09 06:33:54 发布
本文介绍如何使用RoundedBitmapDrawable将普通图片转换为圆形图片,并设置圆角半径。通过调用setCircular(true)方法,使ImageView中的图片呈现为完美的圆形。
3678

被折叠的 条评论
为什么被折叠?



