Skip to content

Commit

Permalink
Merge pull request #37 from NOW-SOPT-APP4-KREAM/mod-just-drop-chips
Browse files Browse the repository at this point in the history
[feat] 추천뷰 하단 칩 수정
  • Loading branch information
Hyobeen-Park authored May 24, 2024
2 parents 72d1489 + b3aa163 commit 831e956
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ class RecommendJustDroppedViewHolder(
tvJustDroppedProductPrice.text = recommendJustDroppedProductModel.price
tvJustDroppedProductTransaction.text = recommendJustDroppedProductModel.transactionCount
ivJustDroppedProductScrap.setImageResource(if (recommendJustDroppedProductModel.isScrap) R.drawable.ic_saved_2_on_24 else R.drawable.ic_saved_2_off_24)
includeJustDroppedProductFastDelivery.tvFastDelivery.visibility = if (recommendJustDroppedProductModel.isFreeDeliver) View.VISIBLE else View.GONE
includeJustDroppedProductFastDelivery.ivFastDelivery.visibility = if (recommendJustDroppedProductModel.isFreeDeliver) View.VISIBLE else View.GONE
includeJustDroppedProductFastDelivery.tvRecommendFastDelivery.visibility = if (recommendJustDroppedProductModel.isFreeDeliver) View.VISIBLE else View.GONE
includeJustDroppedProductFastDelivery.ivRecommendFastDelivery.visibility = if (recommendJustDroppedProductModel.isFreeDeliver) View.VISIBLE else View.GONE
tvJustDroppedProductCoupon.visibility = if (recommendJustDroppedProductModel.isCoupon) View.VISIBLE else View.GONE
tvJustDroppedProductSave.visibility = if (recommendJustDroppedProductModel.isSave) View.VISIBLE else View.GONE
tvJustDroppedProductFreeDeliver.visibility = if (recommendJustDroppedProductModel.isFreeDeliver) View.VISIBLE else View.GONE
tvJustDroppedProductFreeDeliver.visibility = if (recommendJustDroppedProductModel.isFreeDeliver) View.VISIBLE else View.INVISIBLE
root.setOnClickListener {
navigateToProductDetail(position)
}
Expand Down
12 changes: 12 additions & 0 deletions app/src/main/res/drawable/ic_fd_10.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="6dp"
android:height="10dp"
android:viewportWidth="6"
android:viewportHeight="10">
<path
android:pathData="M2.47,1L4.941,1.364L2.47,4.636L4.941,5L0.706,9L2.823,5.364L0,4.636L2.47,1Z"
android:fillColor="#00B856"/>
<path
android:pathData="M3.176,1L5.647,1.364L2.823,4.273L6,5L0.706,9L3.529,5.727L0.353,5L3.176,1Z"
android:fillColor="#02E16A"/>
</vector>
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@

<include
android:id="@+id/include_just_dropped_product_fast_delivery"
layout="@layout/view_fast_delivery"
layout="@layout/view_recommend_fast_delivery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
Expand Down Expand Up @@ -142,7 +142,7 @@
android:textColor="@color/black02"
android:layout_marginTop="9dp"
app:layout_constraintStart_toStartOf="@id/tv_just_dropped_product_brand"
app:layout_constraintTop_toBottomOf="@+id/include_just_dropped_product_fast_delivery"
app:layout_constraintTop_toBottomOf="@+id/tv_just_dropped_product_free_deliver"
tools:text="13,000원" />

<TextView
Expand Down
10 changes: 5 additions & 5 deletions app/src/main/res/layout/view_fast_delivery.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
android:backgroundTint="@color/green05">

<ImageView
android:id="@+id/iv_fast_delivery"
android:id="@+id/iv_recommend_fast_delivery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginVertical="2dp"
Expand All @@ -17,16 +17,16 @@
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/tv_fast_delivery"
android:id="@+id/tv_recommend_fast_delivery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="2dp"
android:text="@string/search_chip_fast_delivery"
android:textAppearance="@style/TextAppearance.Kream.Body7.Regular"
android:textColor="@color/green02"
app:layout_constraintBottom_toBottomOf="@id/iv_fast_delivery"
app:layout_constraintBottom_toBottomOf="@id/iv_recommend_fast_delivery"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/iv_fast_delivery"
app:layout_constraintTop_toTopOf="@+id/iv_fast_delivery" />
app:layout_constraintStart_toEndOf="@+id/iv_recommend_fast_delivery"
app:layout_constraintTop_toTopOf="@+id/iv_recommend_fast_delivery" />

</androidx.constraintlayout.widget.ConstraintLayout>
34 changes: 34 additions & 0 deletions app/src/main/res/layout/view_recommend_fast_delivery.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/shape_border_radius_2"
android:backgroundTint="@color/green05">

<ImageView
android:id="@+id/iv_recommend_fast_delivery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="2dp"
android:src="@drawable/ic_fd_10"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/tv_recommend_fast_delivery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginVertical="2dp"
android:layout_marginStart="1dp"
android:layout_marginEnd="2dp"
android:text="@string/search_chip_fast_delivery"
android:textAppearance="@style/TextAppearance.Kream.Body7.Regular"
android:textColor="@color/green02"
app:layout_constraintBottom_toBottomOf="@id/iv_recommend_fast_delivery"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/iv_recommend_fast_delivery"
app:layout_constraintTop_toTopOf="@+id/iv_recommend_fast_delivery" />

</androidx.constraintlayout.widget.ConstraintLayout>

0 comments on commit 831e956

Please sign in to comment.