0

There is a custom callback example on AQuery wiki:

String imageUrl = "http://www.vikispot.com/z/images/vikispot/android-w.png";

final int tint = 0x77AA0000;

aq.id(R.id.image1).image(imageUrl, true, true, 0, 0, new BitmapAjaxCallback(){

        @Override
        public void callback(String url, ImageView iv, Bitmap bm, AjaxStatus status){

                iv.setImageBitmap(bm);

                //do something to the bitmap
                iv.setColorFilter(tint, PorterDuff.Mode.SRC_ATOP);

        }

});

If I change the bitmap in the callback will the changes be saved to the cache? And is it possible to use BitmapAjaxCallback only if the bitmap was not in the cache?

In short, I want to edit downloaded images and store it in the cache for use in listview.

Martin Milesich
  • 184
  • 3
  • 8

1 Answers1

0

Looking at your code I don't see where you can "edit image before storing it to cache". The parameter you passed in is URL and the callback method parameters point to already fetched (and processed) Bitmap. If you are manipulating it at this point you should look at the code (if available) to see if it is a direct reference and your changes apply to the saved instance. Otherwise you are out of luck

Bostone
  • 36,858
  • 39
  • 167
  • 227