android - Black Background on image loaded with univerisal image loader -
as shown below. first image default image linked @ http://goldentrail.towardstech.com/assets/images/membersimage/buttons/eat.png. while second image below image loaded using uil
this imageloader configuration
file cachedir = storageutils.getcachedirectory(context); imageloaderconfiguration config = new imageloaderconfiguration.builder(context) .memorycacheextraoptions(480, 800) // default = device screen dimensions .disccacheextraoptions(480, 800, compressformat.jpeg, 75) .taskexecutor(asynctask.thread_pool_executor) .taskexecutorforcachedimages(asynctask.thread_pool_executor) .threadpoolsize(3) // default .threadpriority(thread.norm_priority - 1) // default .tasksprocessingorder(queueprocessingtype.fifo) // default .denycacheimagemultiplesizesinmemory() .memorycache(new lrumemorycache(2 * 1024 * 1024)) .memorycachesize(2 * 1024 * 1024) .disccache(new unlimiteddisccache(cachedir)) // default .disccachesize(50 * 1024 * 1024) .disccachefilecount(100) .disccachefilenamegenerator(new hashcodefilenamegenerator()) // default .imagedownloader(new baseimagedownloader(context)) // default .imagedecoder(new baseimagedecoder()) // default .defaultdisplayimageoptions(displayimageoptions.createsimple()) // default .enablelogging() .build();
this displayoptions
displayimageoptions options = new displayimageoptions.builder() .bitmapconfig(bitmap.config.argb_8888) // default .cacheinmemory() .cacheondisc() .build();
did see comment in readme:
don't copy code project! example of options using.
don't use .disccacheextraoptions(480, 800, compressformat.jpeg, 75)
. images saved in disc cache jpeg files can't have transparent background.
Comments
Post a Comment