How to set the background color of an ImageButton 'transparent' ?
The following piece of code works when I try it with default android theme, but with 'Theme.Light', I see a gray background.
ImageButton deleteBtn = new ImageButton( this );
deleteBtn.setImageResource( R.drawable.delete_big );
deleteBtn.setBackgroundColor(android.R.color.transparent);
(I need to dynamically create these buttons.. I have seen solutions which mention specifying @null background color using android's layout.xml files. How can I achieve the same thing programmatically ? Any help highly appreciated. Thanks!