在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 教程/ Android/ 使用其他的Image Loader
進度條
在JAVA代碼中使用Drawees
Drawee的各種效果配置
緩存
一些陷阱
關(guān)于在Android Studio中編譯
多圖請求及圖片復(fù)用
自定義網(wǎng)絡(luò)加載
支持的URIs
可關(guān)閉的引用
監(jiān)聽下載事件
修改圖片
引入Fresco
縮放
圓角和圓圈
配置Image Pipeline
縮放和旋轉(zhuǎn)圖片
(圖片請求)Image Requests
自定義View
使用ControllerBuilder
在XML中使用Drawees
開始使用 Fresco
關(guān)鍵概念
Image Pipeline介紹
漸進式JPEG圖
數(shù)據(jù)源和數(shù)據(jù)訂閱者
直接使用Image Pipeline
動畫圖(gif)
使用其他的Image Loader

使用其他的Image Loader

本教程內(nèi)容來源于:http://fresco-cn.org
采用 知識共享 署名 4.0 國際 許可協(xié)議 進行許可

Drawee is not tied to a particular image loading mechanism and can be used with other image loaders. Drawee 并不是吊死在特定的一種圖片加載機制上,它同樣適用于其他image loader。

不過有一些特性,只有Fresco image pipeline才有。前面的提到的需要使用[ImageRequest]和[配置image pipeline]的特性,使用其他image loader時都有可能不起作用。

Drawee 和 Volley ImageLoader配合使用

我們有一個Drawee使用Volley的 ImageLoader的補充實現(xiàn)。

我們僅僅對那些已經(jīng)深度使用Volley ImageLoader的應(yīng)用推薦這個組合。

同樣地,如要使用,使用下面的依賴,而不是下載頁面給出的依賴:

dependencies {
  // your project's other dependencies
  compile: "com.facebook.fresco:drawee-volley:0.1.0+"
}

初始化Volley ImageLoader

這時,不需要再調(diào)用Fresco.initialize了,需要的是初始化Volley。

Context context;
ImageLoader imageLoader; // build yourself
VolleyDraweeControllerBuilderSupplier mControllerBuilderSupplier
    = new VolleyDraweeControllerBuilderSupplier(context, imageLoader);
SimpleDraweeView.initialize(mControllerBuilderSupplier);

不要讓 VolleyDraweeControllerBuilderSupplier離開作用域,你需要它來創(chuàng)建DraweeController,除非你只使用SimpleDraweeView.setImageURI

DraweeControllers 和 Volley ImageLoader 配合使用

不是調(diào)用Fresco.newControllerBuilder, 而是:

VolleyController controller = mControllerBuilderSupplier
    .newControllerBuilder()
    . // setters
    .build();
mSimpleDraweeView.setController(controller);

Drawee 和其他Image Loader 配合使用

依照源碼 作為例子,其他Image Loader也是可以和Drawee配合使用的,但是沒有我們還沒有Drawee和其他Image loader的配合使用的補充實現(xiàn)。