|
@@ -5,6 +5,7 @@ package kr.co.zumo.app.lifeplus.view.screen.main;
|
|
|
|
|
|
|
|
import android.content.Context;
|
|
import android.content.Context;
|
|
|
import android.graphics.Matrix;
|
|
import android.graphics.Matrix;
|
|
|
|
|
+import android.graphics.drawable.Drawable;
|
|
|
import android.os.Handler;
|
|
import android.os.Handler;
|
|
|
import android.support.annotation.Nullable;
|
|
import android.support.annotation.Nullable;
|
|
|
import android.support.v7.widget.RecyclerView;
|
|
import android.support.v7.widget.RecyclerView;
|
|
@@ -17,7 +18,6 @@ import android.widget.TextView;
|
|
|
import com.bumptech.glide.Glide;
|
|
import com.bumptech.glide.Glide;
|
|
|
import com.bumptech.glide.load.DataSource;
|
|
import com.bumptech.glide.load.DataSource;
|
|
|
import com.bumptech.glide.load.engine.GlideException;
|
|
import com.bumptech.glide.load.engine.GlideException;
|
|
|
-import com.bumptech.glide.load.resource.gif.GifDrawable;
|
|
|
|
|
import com.bumptech.glide.request.RequestListener;
|
|
import com.bumptech.glide.request.RequestListener;
|
|
|
import com.bumptech.glide.request.RequestOptions;
|
|
import com.bumptech.glide.request.RequestOptions;
|
|
|
import com.bumptech.glide.request.target.Target;
|
|
import com.bumptech.glide.request.target.Target;
|
|
@@ -351,23 +351,23 @@ public class MainCategoryContentsImageView extends MainCategoryContentsView {
|
|
|
int overrideHeight = maskHeight + ResourceUtil.dpToPx(50);
|
|
int overrideHeight = maskHeight + ResourceUtil.dpToPx(50);
|
|
|
|
|
|
|
|
Glide.with(imageView)
|
|
Glide.with(imageView)
|
|
|
- .asGif()
|
|
|
|
|
|
|
+// .asBitmap()
|
|
|
.load(url)
|
|
.load(url)
|
|
|
// .apply(new RequestOptions().diskCacheStrategy(DiskCacheStrategy.NONE))
|
|
// .apply(new RequestOptions().diskCacheStrategy(DiskCacheStrategy.NONE))
|
|
|
// .apply(new RequestOptions().skipMemoryCache(true))
|
|
// .apply(new RequestOptions().skipMemoryCache(true))
|
|
|
// .apply(new RequestOptions().centerCrop())
|
|
// .apply(new RequestOptions().centerCrop())
|
|
|
.apply(new RequestOptions().placeholder((ResourceUtil.getDrawable(imageView.getContext(), R.drawable.image_loading_main))))
|
|
.apply(new RequestOptions().placeholder((ResourceUtil.getDrawable(imageView.getContext(), R.drawable.image_loading_main))))
|
|
|
.apply(new RequestOptions().override(/*maskWidth + ResourceUtil.dpToPx(200)*/ overrideWidth, overrideHeight))
|
|
.apply(new RequestOptions().override(/*maskWidth + ResourceUtil.dpToPx(200)*/ overrideWidth, overrideHeight))
|
|
|
- .listener(new RequestListener<GifDrawable>() {
|
|
|
|
|
|
|
+ .listener(new RequestListener<Drawable>() {
|
|
|
@Override
|
|
@Override
|
|
|
- public boolean onLoadFailed(@Nullable GlideException e, Object model, Target<GifDrawable> target, boolean isFirstResource) {
|
|
|
|
|
|
|
+ public boolean onLoadFailed(@Nullable GlideException e, Object model, Target<Drawable> target, boolean isFirstResource) {
|
|
|
showFlag();
|
|
showFlag();
|
|
|
|
|
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
- public boolean onResourceReady(GifDrawable resource, Object model, Target<GifDrawable> target, DataSource dataSource, boolean isFirstResource) {
|
|
|
|
|
|
|
+ public boolean onResourceReady(Drawable resource, Object model, Target<Drawable> target, DataSource dataSource, boolean isFirstResource) {
|
|
|
imageWidth = overrideWidth;
|
|
imageWidth = overrideWidth;
|
|
|
imageHeight = overrideHeight;
|
|
imageHeight = overrideHeight;
|
|
|
|
|
|
|
@@ -383,7 +383,6 @@ public class MainCategoryContentsImageView extends MainCategoryContentsView {
|
|
|
|
|
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
})
|
|
})
|
|
|
.into(imageView);
|
|
.into(imageView);
|
|
|
}
|
|
}
|