Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Transparency bug? android:color/transparent

Random bug on mostly > 4.0 devices

Sometimes transparency that is set in .xml files is shown as white/light grey shade. This happens for practically everything , TextView , ImageView , Button , Relative Layout...

Has anyone experienced this before ?

All I can find is a transparency bug in Jelly Bean that happens with secondary accounts , which isn't related to this.

like image 937
Noob Avatar asked Feb 10 '26 15:02

Noob


1 Answers

I ran into the same issue, but was able to work around the problem by using the 8-digit color code in which the first two digits represent the transparency level (00 being fully transparent, FF being fully opaque).

Using #00000000 results in a fully transparent color and can be used as a direct replacement for android:color/transparent.

like image 53
LWCoder Avatar answered Feb 17 '26 03:02

LWCoder



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!