Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Transparent LinearLayout on Android

I have the folowing layout:

enter image description here

I want to make transparent the transparent_layout but i can't do it.

Already tried settings the background programmatically with the color: Color.TRANSPARENT but it seems it doesnt work.

Im using Android 2.3.3 SDK with SherlockActionBar.

Is there any way to set that layout to transparent?

like image 990
alxsimo Avatar asked May 08 '13 12:05

alxsimo


People also ask

How do I make Constraintlayout transparent?

If you add this line to the Constraint Layout xml it will become transparent: android:background="@android:color/transparent" . This will make the background see through and show what ever is bellow or overlapping.


1 Answers

Depending upon the degree of opacity you like, set the background color like

        android:background="#00ffffff"

The first two digits are for opacity level, (aka alpha) that varies from 00 to ff (fully-transparent to fully-opaque), the remaining digits are for the desired background color. If you keep first 2 digits zero (00), then whatever color you choose for the remaining digits, doesn't matter.

like image 92
Narendra Singh Avatar answered Nov 14 '22 01:11

Narendra Singh