0

My Android application need load amounts image from Internet with api,those pictures so big and massive that need more Lots of bandwidth,So I want load partial(compress) image to save bandwidth.

At first,I tried to use the 'thumbnail' of Glide,it was seem work,the image is compressed but it load full image final. Then,I tried to use the 'override' of Glide,but it only resized the picture in ImageView,The full image is downloaded too.

//The Thumbnail() can load the partial image at first,but download full picture final
        Glide.with(mContext).load(item.imgUrl).thumbnail( 0.5f )
             .apply(bitmapTransform(new RoundedCornersTransformation(50, 0)))
             .into(myViewHolder.commodityImage);

//The override() can resize the picture inside ImageView,but it download the full picture too!
        Glide.with(mContext).load(item.imgUrl)
             .apply(bitmapTransform(new RoundedCornersTransformation(50, 0)).override(400,400))
             .into(myViewHolder.commodityImage);

So,is there a way to download the image partially like the Glide thumbnial but do not download full picture.

Zoe
  • 27,060
  • 21
  • 118
  • 148
roenix
  • 1
  • https://stackoverflow.com/questions/37944879/android-glide-show-a-blurred-image-before-loading-actual-image – AskNilesh Apr 29 '19 at 11:46
  • Welcome to Stack Overflow! Please don't use the glide tag for questions about the Android image loading library. Use [android-glide] instead. See [How do I avoid misusing tags?](https://meta.stackoverflow.com/q/354427/6296561) and [the tagging guide](/help/tagging). – Zoe May 04 '19 at 12:46

1 Answers1

0

Try to used this..

            Glide.with(imageView)
                    .load(path)
                    .apply(RequestOptions().placeholder(R.drawable.place_holder).override(500, Target.SIZE_ORIGINAL))
                    .into(imageView)