Skip to content

Instantly share code, notes, and snippets.

@therne
Created February 21, 2015 15:39
Show Gist options
  • Save therne/4c1eaf3cc164f8fa05cb to your computer and use it in GitHub Desktop.
Save therne/4c1eaf3cc164f8fa05cb to your computer and use it in GitHub Desktop.
Glide Init
/**
* Glide (이미지 로딩 라이브러리)를 초기화한다.
*/
void initGlide() {
Glide.setup(new GlideBuilder(this)
.setDiskCache(DiskLruCacheWrapper.get(Glide.getPhotoCacheDir(this), DISK_CACHE_SIZE))
.setDecodeFormat(DecodeFormat.PREFER_RGB_565)
);
Glide.get(this).register(GlideUrl.class, InputStream.class,
new OkHttpUrlLoader.Factory(new OkHttpClient()));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment