Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Glide 4.13.0 : thumbnail(float) is deprecated

Just updated Glide to Version 4.13.0 and getting this deprecation warning.

On checking the release page, I found this:enter image description here

So, what should be the appropriate equivalent to this part of code?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

GlideApp.with(holder.itemView.getContext())
            .load(sr)
            .thumbnail(0.2f)
            .placeholder(R.drawable.background_splash)
            .into(holder.album);

What I tried:
enter image description here

I think the syntax should be something like this but confused on what to pass to the constructor.

>Solution :

With RequestBuilder you can configure the request for thumbnail with a multiplier. below is an example

 RequestBuilder<Drawable> requestBuilder= Glide.with(this)
            .asDrawable().sizeMultiplier(0.1f);
    requestBuilder.load(R.drawable.myImage).into(binding.imageView);

its should work . just play around with it to explore more options .

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading