Bläddra i källkod

[공통][Common] 컨텐츠 커버 구매예약 플래그 추가

Hasemi 6 år sedan
förälder
incheckning
d3def71acc

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

@@ -36,6 +36,7 @@ import kr.co.zumo.app.lifeplus.view.Visibler;
 public class ContentsCardCoverHolder extends ContentsHolder<ContentsItemBean> {
 
   private ImageView imageViewCardListicleCover;
+  private ImageView imageViewShopping;
   private View dimTop;
   private View dimBottom;
 
@@ -44,11 +45,13 @@ public class ContentsCardCoverHolder extends ContentsHolder<ContentsItemBean> {
     imageViewCardListicleCover = itemView.findViewById(R.id.image_view_card_listicle_cover);
     dimTop = itemView.findViewById(R.id.view_dim_top);
     dimBottom = itemView.findViewById(R.id.view_dim_bottom);
+    imageViewShopping = itemView.findViewById(R.id.shopping_icon);
     Visibler.invisible(dimTop, dimBottom);
   }
 
   @Override
   protected void bindInternal() {
+    imageViewShopping.setVisibility(ContentsItemBean.TYPE_ATTRIBUTE_PURCHASE.equals(bean.getListAttributeType()) ? View.VISIBLE : View.GONE);
     imageViewCardListicleCover.setScaleType(ImageView.ScaleType.CENTER);
     Glide.with(imageViewCardListicleCover)
       .asBitmap()

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

@@ -38,6 +38,7 @@ public class ContentsListicleCoverHolder extends ContentsHolder<ContentsItemBean
 
   private ImageView imageViewBackground;
   private ImageView imageViewArrow;
+  private ImageView imageViewShopping;
   private TextView textViewCategory1;
   private TextView textViewCategory2;
   private TextView textViewSubTitle;
@@ -54,6 +55,7 @@ public class ContentsListicleCoverHolder extends ContentsHolder<ContentsItemBean
     super(itemView);
     imageViewBackground = itemView.findViewById(R.id.image_view_background);
     imageViewArrow = itemView.findViewById(R.id.image_view_arrow);
+    imageViewShopping = itemView.findViewById(R.id.shopping_icon);
     textViewCategory1 = itemView.findViewById(R.id.text_view_category1);
     textViewCategory2 = itemView.findViewById(R.id.text_view_category2);
     textViewSubTitle = itemView.findViewById(R.id.text_view_sub_title);
@@ -72,6 +74,7 @@ public class ContentsListicleCoverHolder extends ContentsHolder<ContentsItemBean
   @Override
   protected void bindInternal() {
 
+    imageViewShopping.setVisibility(ContentsItemBean.TYPE_ATTRIBUTE_PURCHASE.equals(bean.getListAttributeType()) ? View.VISIBLE : View.GONE);
     imageViewBackground.setScaleType(ImageView.ScaleType.CENTER);
     Glide.with(imageViewBackground)
       .asBitmap().load(bean.getImageUrl())

+ 11 - 0
app/src/main/res/layout/contents_card_listicle_cover.xml

@@ -34,4 +34,15 @@
     android:background="@drawable/card_dim_bottom_12"
     app:layout_constraintEnd_toEndOf="parent"
     app:layout_constraintBottom_toBottomOf="parent"/>
+
+  <ImageView
+    android:id="@+id/shopping_icon"
+    android:layout_width="wrap_content"
+    app:layout_constraintBottom_toBottomOf="parent"
+    app:layout_constraintEnd_toEndOf="parent"
+    android:layout_marginEnd="25dp"
+    android:layout_marginBottom="23dp"
+    android:layout_height="wrap_content"
+    app:srcCompat="@drawable/icon_shopping_wh"
+    />
 </android.support.constraint.ConstraintLayout>

+ 11 - 0
app/src/main/res/layout/contents_listicle_cover.xml

@@ -186,4 +186,15 @@
     tools:text="© instagram @robococodd"
     />
 
+  <ImageView
+    android:id="@+id/shopping_icon"
+    android:layout_width="wrap_content"
+    app:layout_constraintBottom_toBottomOf="parent"
+    app:layout_constraintEnd_toEndOf="parent"
+    android:layout_marginEnd="25dp"
+    android:layout_marginBottom="23dp"
+    android:layout_height="wrap_content"
+    app:srcCompat="@drawable/icon_shopping_wh"
+    />
+
 </android.support.constraint.ConstraintLayout>