android - Transparent Image appears black on a Cached Bitmap -


i have imported android's example project in following link. http://developer.android.com/training/displaying-bitmaps/index.html

when ran app, got clean grid of images.

when used transparent image instead of given ones, transparent areas filled black color.

see image. transparent areas around instagram image became black.

i couldn't remove black color no matter whatever change. tried changing grid view's background also. didn't help.

to reproduce problem, load project given in above link , change first 6 items in imgurls in images.java https://lh3.ggpht.com/vfpqp39lb60dli3n-rjnvvtm07dsvizxrcl5xmiy1v4gv4unc1ifxkuexq4n-dbckwi=w124

eg: public final static string[] imageurls = new string[] { "https://lh3.ggpht.com/vfpqp39lb60dli3n-rjnvvtm07dsvizxrcl5xmiy1v4gv4unc1ifxkuexq4n-dbckwi=w124",

there 3 possibilities

  1. background color of layout black that's why transparent area filled black..
  2. if change background color of layout area color changed...
  3. be sure transparent file must .png file
  4. check imagecache uses png compression. default jpg.

Comments