Dev/Android

[Android] Glide 활용해서 TextView 에 이미지 넣기

healthyryu 2017. 9. 21. 18:04

[Android] Glide 활용해서 TextView 에 이미지 넣기


Glide 사용하고 TextView 에 이미지 넣기

Glide.with(Activity.this)
.load(Path)
.bitmapTransform(new CropCircleTransformation(Activity.this))
.diskCacheStrategy(DiskCacheStrategy.NONE)
.skipMemoryCache(true)
.error(null)
.into(new SimpleTarget<GlideDrawable>() {
@Override
public void onResourceReady(GlideDrawable glideDrawable

, GlideAnimation<? super GlideDrawable> glideAnimation) {
TextView.setText("");
TextView.setBackground(glideDrawable.getCurrent());
}
});



https://github.com/bumptech/glide/wiki/Custom-targets


https://github.com/bumptech/glide/issues/1083

반응형