android - Get the alpha of an ImageView -


How can I do this? There is a set alpha, but no getAlpha.

There is no easy way to do this. The reason for this is that ImageView is set with bitmap , a StateListDrawable , a ColorDrawable , or something else May have been completely. There is only one color of one of those classes; The alpha varies for every pixel on any other drawable (pixels are in ARGB format, w / 1 bytes each for alpha, red, green and blue). I am pretty sure that the setAlpha () method only works on measures that support it, as outlined above by Sephy.

What do you need to know about the transparency of the image? If you know that the image view will be filled in advance, you might already be able to extract the alpha if you do not have direct access to alpha, but you are able to set the color, then alpha color> gt; & Gt; 24 .


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -