daily pastebin goal
70%
SHARE
TWEET

Untitled

a guest May 28th, 2018 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // v3以前
  2. Glide.with(context)
  3.   .loadFromMediaStore(localMedia.getLocalPath())
  4.   .asBitmap()
  5.   .imageDecoder(new StreamBitmapDecoder(
  6.     Downsampler.AT_LEAST,
  7.     Glide.get(mContext).getBitmapPool(),
  8.     DecodeFormat.PREFER_ARGB_8888
  9.     ))
  10.   .into(imageView);
  11.  
  12. // v4以降
  13. // optionオブジェクトを構築して…
  14. RequestOptions options = new RequestOptions()
  15.                 .format(DecodeFormat.PREFER_ARGB_8888)
  16.                 .downsample(DownsampleStrategy.AT_LEAST);
  17. // applyでoptionsをset
  18. GlideApp.with(context)
  19.   .asBitmap()
  20.   .load(uri)
  21.   .apply(options)
  22.   .into(imageView);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top