when I use my own Target to put the Bitmap loaded by Picasso into my ImageView like this (I do that because I want to compress the bitmap to a byte array to store it in sqlite):
private ImageView imageView;
.
.
.
Picasso.with(getContext()).load(uri).into(target);
private Target target=new Target()
{
@Override
public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from)
{
imageView.setImageDrawable(new BitmapDrawable(getContext().getResources(), bitmap));
}
@Override
public void onBitmapFailed(Drawable errorDrawable)
{
}
@Override
public void onPrepareLoad(Drawable placeHolderDrawable)
{
}
};
I do that in the getView method of my ArrayAdapter, which serves a GridView. it is very slow (without compressing yet), showing the pics in the final gridview only bit by bit, in contrast to putting it directly into the imageview. why is that? how can I combine fast Picasso loading with retrieving the bytes of every loaded pic?