0

I use the following color

<color name="bg_color">#70236790</color>

As one can see it has the alpha value set.

If the color is applied to a layout which is using the Theme light, it is working. If I dont add the Theme value in the manifest, the color is getting very dark. I think the reason is that behind my relativeLayout is another view which is black (caused by the theme).

All other views in the layout I have set to

 android:background="@android:color/transparent"

How can I make it work?

tobias
  • 2,322
  • 3
  • 33
  • 53
  • http://stackoverflow.com/questions/2838757/how-to-set-opacity-alpha-for-view-in-android. http://stackoverflow.com/questions/1492554/set-transparent-background-of-an-imageview-in-android. These link's should help. – Raghunandan Oct 14 '12 at 14:06
  • I know how to set transparency. But the problem is that then the color of the view behind is influencing it. And it seems that if there is no Theme there is black as main background. – tobias Oct 14 '12 at 14:17

1 Answers1

0

Set the activity theme in your manifest file to set the activity's background transparent. .

 android:theme="@android:style/Theme.Translucent" 
knvarma
  • 974
  • 5
  • 6