Reputation: 7343
I have an application that generates imageButtons and places them in a TableRow.
However, the imageButton has a gray border along the sides that weren't on the image in the drawable folder.
How can I programmatically remove these borders? So far, the solution I've seen use the xml properties in the layout but I can't use that solution since I programmatically generate my imageButtons.
Any ideas?
Upvotes: 0
Views: 1893
Reputation: 467
You can use
ImageButton btn = (ImageButton)findViewById(R.id.imagebutton);
btn.setBackground(null);
Good luck
Upvotes: 0