Pārlūkot izejas kodu

[컨텐츠][New] copyright 임시 형식

hyodong.min 6 gadi atpakaļ
vecāks
revīzija
be80cde87a

+ 11 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/bean/api/ContentsDetailImageBean.java

@@ -30,6 +30,9 @@ public class ContentsDetailImageBean extends LifeplusImageBean {
   @SerializedName("itemCdntList")
   private List<ItemRectBean> itemRectList;    // 이미지 위에 클릭 영역 지정하기.
 
+  @SerializedName("copyright")
+  private String copyright;
+
   public List<ItemRectBean> getItemRectList() {
     return itemRectList;
   }
@@ -61,4 +64,12 @@ public class ContentsDetailImageBean extends LifeplusImageBean {
   public void setUtilityUrl(String utilityUrl) {
     this.utilityUrl = utilityUrl;
   }
+
+  public String getCopyright() {
+    return copyright;
+  }
+
+  public void setCopyright(String copyright) {
+    this.copyright = copyright;
+  }
 }

+ 13 - 6
app/src/main/java/kr/co/zumo/app/lifeplus/bean/api/ContentsItemBean.java

@@ -58,8 +58,8 @@ public class ContentsItemBean extends LifeplusContentsBean {
   @SerializedName("itemRecuList") // 이미지 아래 1. 2... 내용
   private List<ContentsDescriptionBean> descriptionList;
 
-  @SerializedName("copyRight")
-  private String copyRight;
+  @SerializedName("copyright")
+  private String copyright;
 
   public String getListItemNo() {
     return listItemNo;
@@ -216,12 +216,19 @@ public class ContentsItemBean extends LifeplusContentsBean {
     this.descriptionList = descriptionList;
   }
 
-  public String getCopyRight() {
-    return copyRight;
+  public String getCopyright() {
+    if (StringUtil.isFull(copyright)) {
+      return copyright;
+    }
+
+    if (null != itemImageList && itemImageList.size() > 0) {
+      copyright = itemImageList.get(0).getCopyright();
+    }
+    return copyright;
   }
 
-  public void setCopyRight(String copyRight) {
-    this.copyRight = copyRight;
+  public void setCopyright(String copyright) {
+    this.copyright = copyright;
   }
 
   public ContentsButtonInfoBean getButtonInfo() {

+ 0 - 9
app/src/main/java/kr/co/zumo/app/lifeplus/bean/api/LifeplusImageBean.java

@@ -39,8 +39,6 @@ public class LifeplusImageBean extends JsonBeanBase {
   @SerializedName("imagFileUrl")
   private String imageUrl;
 
-  private String copyRight;
-
   public String getImageNo() {
     return imageNo;
   }
@@ -65,11 +63,4 @@ public class LifeplusImageBean extends JsonBeanBase {
     this.imageUrl = imageUrl;
   }
 
-  public String getCopyRight() {
-    return copyRight;
-  }
-
-  public void setCopyRight(String copyRight) {
-    this.copyRight = copyRight;
-  }
 }

+ 2 - 7
app/src/main/java/kr/co/zumo/app/lifeplus/view/custom/contents/CustomListicleImageViewHolder.java

@@ -14,7 +14,6 @@ import java.util.List;
 import kr.co.zumo.app.R;
 import kr.co.zumo.app.lifeplus.bean.api.ContentsDetailImageBean;
 import kr.co.zumo.app.lifeplus.bean.api.ItemRectBean;
-import kr.co.zumo.app.lifeplus.util.AppUtil;
 import kr.co.zumo.app.lifeplus.util.ResourceUtil;
 import kr.co.zumo.app.lifeplus.view.Event;
 import kr.co.zumo.app.lifeplus.view.IEventListener;
@@ -57,12 +56,8 @@ public class CustomListicleImageViewHolder extends RecyclerView.ViewHolder {
       .apply(new RequestOptions().skipMemoryCache(true))
       .load(bean.getImageUrl()).into(imageViewBackground);
 
-    // TODO: copyright 처리
-    if (null != bean.getCopyRight()) {
-      textViewCopyRight.setText(bean.getCopyRight());
-    }
-    else if (AppUtil.isDebug()) {
-      textViewCopyRight.setText(R.string.copy_right);
+    if (null != bean.getCopyright()) {
+      textViewCopyRight.setText(bean.getCopyright());
     }
   }
 

+ 2 - 3
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/contents/ContentsListicleCoverHolder.java

@@ -125,9 +125,8 @@ public class ContentsListicleCoverHolder extends ContentsHolder<ContentsItemBean
       tagTextViewList.get(i).setOnClickListener(view -> {listener.onEvent(new Event.Builder(Event.TAG).index(tagIndex).build());});
     }
 
-    // TODO: copyright 처리
-    if (null != bean.getCopyRight()) {
-      textViewCopyRight.setText(bean.getCopyRight());
+    if (null != bean.getCopyright()) {
+      textViewCopyRight.setText(bean.getCopyright());
     }
 
     imageViewArrow.setOnClickListener(view -> {listener.onEvent(new Event.Builder(Event.SCROLL).build());});