Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

png image showing up with grey background in android

I have some png image buttons that I use in my app. But they are showing up with grey backgrounds on my page. Does android always show a grey background for a transparent one? Is there a work around?
This is how it showed before.

enter image description here
This is how it shows after I made #FF000000 edits

enter image description here


This is how I want it to show.
EDIT:
Error when I use #FF:
Color value not valid -- must be #rgb, #argb, #rrggbb, or #aarrggbb (at 'background' with value '#FF'). main.xml

like image 709
Brahadeesh Avatar asked Aug 10 '11 20:08

Brahadeesh


2 Answers

@android:color/transparent. Phoenixblade9 was close.

like image 145
Brahadeesh Avatar answered Sep 18 '22 12:09

Brahadeesh


If the image is transparent, there should be nothing shown behind the image.

The default colors vary from distribution to distribution. The color scheme/theme for an HTC phone will be different than from a Motorola phone, or the emulator.

If you want to ensure that a view has a transparent background, set the following in your XML code for that view:

android:background="@android:color/transparent"

This should ensure the background is completely transparent.

like image 28
Codeman Avatar answered Sep 18 '22 12:09

Codeman