how to set alpha at RelativeLayout like this image?
Asked
Active
Viewed 43 times
1 Answers
0
You can do it both in xml and programatically by using 8-digit color(#AARRGGBB) like this:
android:background="#CC000000"
first two digit is for transparency. for more details look at this link
or you can do it programatically in this way:
View yourRelativeLayout = findViewById(R.id.yourrelativelayout);
Drawable background = yourRelativeLayout.getBackground();
background.setAlpha(85);

kAvEh
- 534
- 4
- 15