Q:

How to remove the background of a (regular) view (Android)

I have the following code:  
View view = new View(this);  
view.setBackgroundDrawable(...);  
...  

And here I want to remove that background.
Just turn it back as it was before.  
I tried these and failed:  
view.setBackgroundDrawable(null);  
view.setBackgroundColor(0xFF000000);  
view.setBackgroundColor(0x00000000);  

Any more ideas?

A:

view.setBackgroundDrawable(null); should work.
You may try one of these:
v.setBackgroundColor(Color.WHITE);
//or
v.setBackgroundColor(Color.parseColor("#ff0000")); //whatever color

Make sure the view you're applying the background to is the correct instance.

