Issue
Just updated Glide to Version 4.13.0 and getting this deprecation warning.
On checking the release page, I found this:
So, what should be the appropriate equivalent to this part of code?
GlideApp.with(holder.itemView.getContext())
.load(sr)
.thumbnail(0.2f)
.placeholder(R.drawable.background_splash)
.into(holder.album);
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= GlideApp.with(holder.itemView.getContext())
.asDrawable().sizeMultiplier(0.1f);
GlideApp.with(holder.itemView.getContext())
.load(sr)
.thumbnail(requestBuilder)
.placeholder(R.drawable.background_splash)
.into(holder.album);
its should work . just play around with it to explore more options .
Answered By - ADM
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.