Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: Nested linear layout with different alpha value

I have a rectangular LinearLayout that has some margin, some round corners and an alpha value of 0.3. Inside this layout I have 4 different layouts as I display different images in different positions.

My issue is that although the primary layout is 0.3, I want my child to be fully visible, or not affected by it's parent alpha, and I am wondering how I can please do that please? I have tried setting alpha=1 on the children layouts but it did not work. Setting it to 0 does make the children layout disappear though, so it seems I can reduce below 0.3 but not anything above the parent. Is that a bug or am I doing it wrong please?

Thank you.

like image 663
user1777907 Avatar asked Nov 28 '22 17:11

user1777907


1 Answers

I actually figured it out! The colors are AARRGGBB, so modifying the alpha channel (AA) only affects the current background and not the children! If there is another solution, I am happy to hear it. Thanks!

like image 173
user1777907 Avatar answered Dec 05 '22 02:12

user1777907