通过 setAlpha 方法对 ImageView 进行模糊处理

发布于 2024-12-15 20:24:49 字数 170 浏览 2 评论 0原文

我想在“模糊”属性中显示 ImageView 的图像,

因此为此我应用了 imageview.setAlpha(int)

这里它需要 0 到 1 作为 0 表示透明,1 表示不透明,

所以我如何做到这一点我想要将浮动值传递给模糊我的图像,还有其他方法可以做到这一点吗? 提前致谢

I want to show the image of an ImageView in the "Blur" property,

So for doing this I apply the imageview.setAlpha(int)

Here it takes 0 to 1 as 0 for transparent, and 1 for opaque

so how i do this i want to pass floating value to Blur my image, is there any other way to doing this.
Thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

美人骨 2024-12-22 20:24:49

它需要一个十六进制浮点数。

所以 iv.setAlpha(0x00) 用于透明, iv.setAlpha(0xff) 用于不透明。

这是你想要的吗?

it takes a hexadecimal float .

so iv.setAlpha(0x00) is for transparent and iv.setAlpha(0xff) for opaque .

is it what you want ?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文