How does Java and Android darken ImageView
•
Java
As IOS developers told me, IOS darkens the image when someone clicks it (I don't know how real it is), so I need the same thing
As far as I know, I need a normal selector XML to make a drawable with different states What I need is to darken the image in a simple way, maybe using XML drawable in some way, so I don't have to use Photoshop without my skills
Is there any way to do this at the XML level?
Solution
Instead of trying to use XML, you can place a black rectangle behind the bitmap and set the opacity of the bitmap
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码