removing backgroundcolor of a view in android

sat picture sat · Oct 29, 2010 · Viewed 40.9k times · Source

Removing Background color in Android

I have set backgroundColor in code like this,

View.setBackgroundColor(0xFFFF0000);

How to remove this background color on some event?

Answer

kiki picture kiki · Oct 29, 2010

You should try setting the background color to transparent:

view.setBackgroundColor(0x00000000);