Glide 3.6.0 发布,Android 图片加载和缓存库 - 开源中国社区
Float_left Icon_close
Glide 3.6.0 发布,Android 图片加载和缓存库
oschina 2015年05月03日

Glide 3.6.0 发布,Android 图片加载和缓存库

oschina oschina 发布于2015年05月03日 收藏 52 评论 4

阿里云高性能云服务器,2折起! >>> >>>  

Glide 3.6.0 发布,此版本是个 bug 修复版本,包括一些 Android 开源图像加载库的平滑滚动新特性。

新特性

  • Add a clearDiskCache() method (#352, thanks to @nemphys)

  • Add simpler DiskCacheFactory implementation (#430, thanks to @Tolriq)

  • Add a fallback drawable to display for null models (#268)

  • Add a method to ViewTarget to globally set an id to use with setTag

  • Allow requests to be paused/resumed recursively for Activities and/or Fragments and their child fragments (5210ba8, thanks to Paul)

  • Add support for http headers to GlideUrl (fee6ed6, thanks to Ozzie)

  • Add somewhat more robust handling of uncaught exceptions (#435)

  • Add a custom request factory for the Volley integration library (3dcad68, thanks to Jason)

构建/架构

Bugs 修复

  • Check the response code in OkHttp integration library (#315)

  • Fix a crash mutating SquaringDrawable (#349)

  • Removed an unnecessary anti alias flag in the paint used for default transformations (#366)

  • Fix an NPE when the disk cache directory could not be created (#374)

  • Fix a concurrent modification starting requests when other requests complete/fail (#375)

  • Ensure preload targets are always cleared (#385)

  • Handle reading/skipping less than expected data in ImageHeaderParser (#387)

  • Work around a framework bug decoding webp images from InputStreams by basing available() on the content length (#392)

  • Always obey custom cross fade duration (#398)

  • Work around a framework issue where media store thumbs are not rotated (#400)

  • Fix an NPE in RequestFutureTarget (#401, thanks to @Tolriq)

  • Avoid throwing exceptions when provided invalid resource ids (#413)

  • Improve the error message when asked to load the empty string (#415)

  • Fix a race in DecodeJob's cancel method (#424)

  • Fix a race where downloading the same url twice with difference keys using SOURCE or ALL could cause the load to fail (#427)

  • Fix a calculation error in Downsampler.AT_MOST (#434)

  • Make sure code style in OkHttp library is consistent (#397, thanks to @floating-cat)

  • Fix a bitmap re-use bug during cross fades (a9f80ea)

更多内容请看发行说明,此版本现已提供下载:

Glide 是一个 Android 上的图片加载和缓存库,其目的是实现平滑的图片列表滚动效果。

示例代码:

// For a simple view:
@Override
public void onCreate(Bundle savedInstanceState) {
    ...
 
    ImageView imageView = (ImageView) findViewById(R.id.my_image_view);
 
    Glide.with(this).load("http://goo.gl/h8qOq7").into(imageView);
}
 
// For a list:
@Override
public View getView(int position, View recycled, ViewGroup container) {
    final ImageView myImageView;
    if (recycled == null) {
        myImageView = (ImageView) inflater.inflate(R.layout.my_image_view,
                container, false);
    } else {
        myImageView = (ImageView) recycled;
    }
 
    String url = myUrls.get(position);
 
    Glide.with(myFragment)
        .load(url)
        .centerCrop()
        .placeholder(R.drawable.loading_spinner)
        .crossFade()
        .into(myImageView);
 
    return myImageView;
}
本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处,尊重他人劳动共创开源社区。
转载请注明:文章转载自 开源中国社区 [http://www.oschina.net]
本文标题:Glide 3.6.0 发布,Android 图片加载和缓存库
分享
评论(4)
最新评论
0

引用来自“林坦克”的评论

一看就知道是基于picasso的,还不如用picasso
一看你就什么也不懂
0

引用来自“林坦克”的评论

一看就知道是基于picasso的,还不如用picasso
最关键是gif~~~
0

引用来自“林坦克”的评论

一看就知道是基于picasso的,还不如用picasso
他们 是两个项目吧, API 用法比较相似..
0
一看就知道是基于picasso的,还不如用picasso
顶部