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

jopen 9年前

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;  }

Glide 3.6.1 发布,此版本是个 bug 修复版本:

  • Apply Bitmap transformations to GIFs (#507)

  • Improve handling of webp images on certain platforms by adding default content encoding and user agent headers (#470)

下载:

来自:http://www.oschina.net/p/glide