From 9b629c94cc93445751901f0608480d4273258e02 Mon Sep 17 00:00:00 2001 From: sub101 Date: Sun, 10 Dec 2023 23:05:46 +0900 Subject: [PATCH] =?UTF-8?q?#160/=EC=86=8C=EC=9B=90=EA=B6=8C=20Ui=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/sopt/uni/presentation/wish/WishActivity.kt | 9 ++++++++- .../presentation/wish/fragment/WishUseMyFragment.kt | 2 ++ app/src/main/res/layout/activity_wish.xml | 13 +++++++++++++ app/src/main/res/values/strings.xml | 1 + 4 files changed, 24 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/sopt/uni/presentation/wish/WishActivity.kt b/app/src/main/java/sopt/uni/presentation/wish/WishActivity.kt index 3497ec4b..42fb6d8a 100644 --- a/app/src/main/java/sopt/uni/presentation/wish/WishActivity.kt +++ b/app/src/main/java/sopt/uni/presentation/wish/WishActivity.kt @@ -54,13 +54,20 @@ class WishActivity : BindingActivity(R.layout.activity_wish wishViewModel.wishCouponList.observe(this) { var wishList = mutableListOf() - if (it.isEmpty() && !wishViewModel.isMineState.value!!) { + if (it.isEmpty() && wishViewModel.isMineState.value!!) { binding.rvWish.visibility = View.INVISIBLE binding.tvWishEmptyMy.visibility = View.VISIBLE + binding.tvWishEmptyYour.visibility = View.INVISIBLE + return@observe + } else if (it.isEmpty() && !wishViewModel.isMineState.value!!) { + binding.rvWish.visibility = View.INVISIBLE + binding.tvWishEmptyYour.visibility = View.VISIBLE + binding.tvWishEmptyMy.visibility = View.INVISIBLE return@observe } else { binding.rvWish.visibility = View.VISIBLE binding.tvWishEmptyMy.visibility = View.INVISIBLE + binding.tvWishEmptyYour.visibility = View.INVISIBLE } if (wishViewModel.isMineState.value!!) { wishList.add(WishMultiData(0, wishViewModel.newWishCoupon.value)) diff --git a/app/src/main/java/sopt/uni/presentation/wish/fragment/WishUseMyFragment.kt b/app/src/main/java/sopt/uni/presentation/wish/fragment/WishUseMyFragment.kt index fa177b1f..c972c9b7 100644 --- a/app/src/main/java/sopt/uni/presentation/wish/fragment/WishUseMyFragment.kt +++ b/app/src/main/java/sopt/uni/presentation/wish/fragment/WishUseMyFragment.kt @@ -73,10 +73,12 @@ class WishUseMyFragment : Fragment() { with(binding) { if (wishCouponIsUsed == true) { btnWishUseMyFinish.isEnabled = false + btnWishUseMyFinish.setText(R.string.wish_used) btnWishUseMyFinish.backgroundTintList = resources.getColorStateList(R.color.Gray_300) } else { btnWishUseMyFinish.isEnabled = true + btnWishUseMyFinish.setText(R.string.wish_use_wish) btnWishUseMyFinish.backgroundTintList = resources.getColorStateList(R.color.Lightblue_500) } diff --git a/app/src/main/res/layout/activity_wish.xml b/app/src/main/res/layout/activity_wish.xml index 3f3b76f3..e4a72c6d 100644 --- a/app/src/main/res/layout/activity_wish.xml +++ b/app/src/main/res/layout/activity_wish.xml @@ -165,6 +165,19 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/tv_wish_my_wish" /> + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 9bfdf7ac..06f2f180 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -79,6 +79,7 @@ 사용한 소원권은 취소할 수 없어요 상대가 아직 사용하지 않은 소원권이에요 이미 사용한 소원권이에요 + 이미 사용한 소원권입니다 %s의 소원은