views:

72

answers:

2

I would like to change the transparency of a whole View in Android. How can I do that? The View has a nontransparent background.

A: 

View.setBackgroundDrawable. Use a ColorDrawable with appropriate alpha value?

Paul Grime
That is only possible if I use a Color as a background. What if I use a drawable? I could always change the alpha of png that is shown as the background manually but that seems to be a bad solution for some cases.
Janusz