简体   繁体   中英

How to put this effect on an imageview in android

I'm using Glide for loading an image by an url and I want to reproduce the same effect on my imageview. How can I put this effect on an imageview like this one?

Goutham制作的电视系列Android应用UI
(source: cloudfront.net )

imageView.setImageAlpha()应该可以工作。该方法的取值范围是0到255,其中0是完全透明的,而255是完全不透明的。

Also, you can set the opacity for your ImageView in your XML file with alpha attribute:

android:alpha="0.0" fully invisible

android:alpha="0.5" half invisible/half visible

android:alpha="1.0" fully visible

you can also set numbers like 0.56565 for better precision of the desired opacity.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM