From 3fdc7f19ba9cb3e7dc14cb20b2ff194670436d19 Mon Sep 17 00:00:00 2001 From: soopeach Date: Wed, 13 Mar 2024 17:10:06 +0900 Subject: [PATCH] =?UTF-8?q?[develop]:=20=ED=9B=84=EA=B8=B0=EC=97=90=20?= =?UTF-8?q?=EC=82=AC=EC=A7=84=20=EB=B3=B4=EC=9D=B4=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mypage/adapter/RestaurantReviewAdapter.kt | 9 +++ .../src/main/res/layout/item_review_image.xml | 19 ++++++ .../res/layout/item_review_restaurant.xml | 66 +++++++++++-------- 3 files changed, 65 insertions(+), 29 deletions(-) create mode 100644 presentation/src/main/res/layout/item_review_image.xml diff --git a/presentation/src/main/java/org/gdsc/presentation/view/mypage/adapter/RestaurantReviewAdapter.kt b/presentation/src/main/java/org/gdsc/presentation/view/mypage/adapter/RestaurantReviewAdapter.kt index 7d8008e0..4af56f22 100644 --- a/presentation/src/main/java/org/gdsc/presentation/view/mypage/adapter/RestaurantReviewAdapter.kt +++ b/presentation/src/main/java/org/gdsc/presentation/view/mypage/adapter/RestaurantReviewAdapter.kt @@ -1,6 +1,7 @@ package org.gdsc.presentation.view.mypage.adapter import android.view.LayoutInflater +import android.view.View import android.view.ViewGroup import androidx.recyclerview.widget.DiffUtil import androidx.recyclerview.widget.ListAdapter @@ -26,6 +27,14 @@ class RestaurantReviewAdapter( tvNickname.text = item.userName tvContent.text = item.reviewContent + + if (item.reviewImages.isEmpty()) { + rvReviewImages.visibility = View.GONE + } else { + rvReviewImages.adapter = ReviewImageAdapter().apply { + submitList(item.reviewImages) + } + } } } } diff --git a/presentation/src/main/res/layout/item_review_image.xml b/presentation/src/main/res/layout/item_review_image.xml new file mode 100644 index 00000000..e7cdabab --- /dev/null +++ b/presentation/src/main/res/layout/item_review_image.xml @@ -0,0 +1,19 @@ + + + + + + \ No newline at end of file diff --git a/presentation/src/main/res/layout/item_review_restaurant.xml b/presentation/src/main/res/layout/item_review_restaurant.xml index 737b4180..71e34eba 100644 --- a/presentation/src/main/res/layout/item_review_restaurant.xml +++ b/presentation/src/main/res/layout/item_review_restaurant.xml @@ -1,69 +1,77 @@ - + android:padding="16dp"> + app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintStart_toEndOf="@id/iv_profile" + app:layout_constraintTop_toTopOf="parent" + tools:text="권나무방구뿡뿡" /> + + + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/rv_review_images" + tools:text="와 정말 맛있더군요 여기 안가면 바보입니다 하하하하하하하하하하하하하하하하하하하하하하하하하하하하하하하하하하하하하하하하하하하하하하하하" /> + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toStartOf="@id/iv_thumb_up" + app:layout_constraintTop_toBottomOf="@id/tv_content" /> - - + android:src="@drawable/ic_thumb_up" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toBottomOf="@id/tv_content" /> \ No newline at end of file