Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] 추천뷰 하단 칩 수정 #37

Merged
merged 2 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
Loading