Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在我的应用程序中禁用图像视图。(如 iphone)。当我的活动启动时,我在 Imageview 中显示一个图像,然后如果我单击图像,我想让它禁用它。在某种意义上禁用它会变得更加透明。
谢谢....
点击ImageView
ImageView
myImageView.getDrawable().mutate().setAlpha(70); myImageView.invalidate();
这将使图像有些透明。中的值越小setAlpha(),图像将变得越透明。
setAlpha()