|
|
@@ -1,13 +1,19 @@
|
|
|
package kr.co.zumo.app.lifeplus.view.screen.contents;
|
|
|
|
|
|
+import android.util.Log;
|
|
|
import android.view.View;
|
|
|
+import android.view.ViewGroup;
|
|
|
import android.widget.ImageView;
|
|
|
|
|
|
import com.bumptech.glide.Glide;
|
|
|
import com.bumptech.glide.load.resource.bitmap.BitmapTransitionOptions;
|
|
|
+import com.bumptech.glide.request.RequestOptions;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
|
|
|
import kr.co.zumo.app.R;
|
|
|
import kr.co.zumo.app.lifeplus.bean.api.ContentsDetailBean;
|
|
|
+import kr.co.zumo.app.lifeplus.bean.api.ContentsDetailImageBean;
|
|
|
|
|
|
/**
|
|
|
* ContentsCardCoverHolder
|
|
|
@@ -35,6 +41,37 @@ public class ContentsCardCoverHolder extends ContentsHolder<ContentsDetailBean>
|
|
|
.load(bean.getImageUrl())
|
|
|
.transition(new BitmapTransitionOptions().crossFade(100))
|
|
|
.into(imageViewCardListicleCover);
|
|
|
+
|
|
|
+
|
|
|
+ // adding image
|
|
|
+ if (null != bean.getItemImageList()) {
|
|
|
+ int size = bean.getItemImageList().size();
|
|
|
+ Log.w("APP# ContentsCardHolder | bindInternal", "|" + size);
|
|
|
+ if (size > 0) {
|
|
|
+// Log.w("APP# ContentsCardHolder | bindInternal", "|" + bean.getItemImageList().get(0).toJson());
|
|
|
+ List<ContentsDetailImageBean> list = bean.getItemImageList().get(0).getItemImageAddList();
|
|
|
+ if (null != list) {
|
|
|
+ int len = list.size();
|
|
|
+ if (len > 0) {
|
|
|
+ ViewGroup parent = (ViewGroup) imageViewCardListicleCover.getParent();
|
|
|
+
|
|
|
+ for (int i = 0; i < len; ++i) {
|
|
|
+ ContentsDetailImageBean contentsDetailImageBean = list.get(i);
|
|
|
+ ImageView imageView = new ImageView(itemView.getContext());
|
|
|
+ imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
|
|
|
+
|
|
|
+ parent.addView(imageView, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
|
|
|
+
|
|
|
+ Glide.with(imageView)
|
|
|
+ .asBitmap()
|
|
|
+ .apply(new RequestOptions().fitCenter())
|
|
|
+ .load(contentsDetailImageBean.getImageUrl())
|
|
|
+ .into(imageView);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@Override
|