Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 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);
Add Comment
Please, Sign In to add comment