0

I am using Subsampling scale imageview to display a large image (approximately 3000x3000).

I am aslo using picasso decoder to download image from the internet. The problem is, that when I try to get image from cache, it does not work because picasso can not download it. The decoder is from the official page.

I had an idea to download the image and save it to file beforehand and the just show it. The problem is that then I get som skia exception and other stuff, basically, this doesn't seem to be the correct way.

Any ideas ?

Lukas Anda
  • 716
  • 1
  • 9
  • 30

1 Answers1

0

@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.full_image, container, false);

Glide.with(getActivity()).load("http://t0.geograph.org.uk/stamp.php?id=" + mParam1 + "&font=Helvetica&style=&weight=&gravity=South&pointsize=").asBitmap().into(new SimpleTarget<Bitmap>() {
    @Override
    public void onResourceReady(Bitmap resource, GlideAnimation<? super Bitmap> glideAnimation) {
        SubsamplingScaleImageView hillImageView = (SubsamplingScaleImageView) view.findViewById(R.id.hill_image);
        hillImageView.setMinimumDpi(80);
        hillImageView.setImage(ImageSource.bitmap(resource));
    }
});


return view;

}