开发者

How to Disable Image like Iphone in ANDROID?

开发者 https://www.devze.com 2023-03-27 08:03 出处:网络
i want to disable view of开发者_开发技巧 image in my app.(like iphone). when my activity is launch i show one Image in Imageview then if i click on image i want to make it disable it. disable in the s

i want to disable view of开发者_开发技巧 image in my app.(like iphone). when my activity is launch i show one Image in Imageview then if i click on image i want to make it disable it. disable in the sense it will become more transparent.

Thanks....


onClicking the ImageView

myImageView.getDrawable().mutate().setAlpha(70);
myImageView.invalidate();

this will make the image somewhat transparent. Lesser the value in setAlpha(), the more transparent the image will become.

0

精彩评论

暂无评论...
验证码 换一张
取 消