Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// v3以前
Glide.with(context)
.loadFromMediaStore(localMedia.getLocalPath())
.asBitmap()
.imageDecoder(new StreamBitmapDecoder(
Downsampler.AT_LEAST,
Glide.get(mContext).getBitmapPool(),
DecodeFormat.PREFER_ARGB_8888
))
.into(imageView);
// v4以降
// optionオブジェクトを構築して…
RequestOptions options = new RequestOptions()
.format(DecodeFormat.PREFER_ARGB_8888)
.downsample(DownsampleStrategy.AT_LEAST);
// applyでoptionsをset
GlideApp.with(context)
.asBitmap()
.load(uri)
.apply(options)
.into(imageView);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.