How to remove ImageButton's standard background image?

lomza picture lomza · Mar 28, 2011 · Viewed 49.4k times · Source

In ImageButton I want to remove the standard button background image. In http://developer.android.com it is said, that one must define his\her own background image or set the background color to be transparent. I tried to set a black background, but it didn't make any effect...

Answer

Mudassir picture Mudassir · Mar 28, 2011

You can use android:background="@null" for your ImageButton.

See also:
    Android Developers official guide on Buttons