LiveReservationAll 문자열 리소스화

This commit is contained in:
2025-12-02 15:46:28 +09:00
parent 4a8442cb33
commit cc517eb4d3
8 changed files with 48 additions and 24 deletions

View File

@@ -9,6 +9,7 @@ import androidx.recyclerview.widget.RecyclerView
import com.bumptech.glide.Glide
import com.bumptech.glide.load.resource.bitmap.CenterCrop
import com.bumptech.glide.load.resource.bitmap.RoundedCorners
import kr.co.vividnext.sodalive.R
import kr.co.vividnext.sodalive.common.SharedPreferenceManager
import kr.co.vividnext.sodalive.databinding.ItemMyLiveReservationBinding
import kr.co.vividnext.sodalive.databinding.LiveBookingCardBinding
@@ -94,7 +95,8 @@ class LiveReservationAdapter(
binding.tvDayOfWeek.text = dateMap["dayOfWeek"]
binding.tvTime.text = dateMap["time"]
binding.tvMonth.text = "${dateMap["month"]}"
binding.tvMonth.text =
context.getString(R.string.live_reservation_month_label, dateMap["month"])
binding.tvDay.text = dateMap["day"]
if (item.isReservation) {
@@ -149,7 +151,8 @@ class LiveReservationAdapter(
binding.tvDayOfWeek.text = dateMap["dayOfWeek"]
binding.tvTime.text = dateMap["time"]
binding.tvMonth.text = "${dateMap["month"]}"
binding.tvMonth.text =
context.getString(R.string.live_reservation_month_label, dateMap["month"])
binding.tvDay.text = dateMap["day"]
if (item.price <= 0) {

View File

@@ -83,7 +83,7 @@ class LiveReservationAllActivity : BaseActivity<ActivityLiveReservationAllBindin
@SuppressLint("NotifyDataSetChanged")
override fun setupView() {
binding.toolbar.tvBack.text = "라이브, 예약 캘린더"
binding.toolbar.tvBack.text = getString(R.string.screen_live_reservation_all_title)
binding.toolbar.tvBack.setOnClickListener { finish() }
loadingDialog = LoadingDialog(this, layoutInflater)
@@ -199,7 +199,7 @@ class LiveReservationAllActivity : BaseActivity<ActivityLiveReservationAllBindin
private fun onClickReservation(roomId: Long) {
viewModel.getRoomDetail(roomId) {
if (it.manager.id == SharedPreferenceManager.userId) {
showToast("내가 만든 라이브는 예약할 수 없습니다.")
showToast(getString(R.string.screen_live_reservation_self_block))
} else {
if (it.isPrivateRoom) {
LiveRoomPasswordDialog(
@@ -217,11 +217,14 @@ class LiveReservationAllActivity : BaseActivity<ActivityLiveReservationAllBindin
LivePaymentDialog(
activity = this,
layoutInflater = layoutInflater,
title = "${it.price.moneyFormat()} 캔으로 예약",
desc = "'${it.title}' 라이브에 참여하기 위해 결제합니다.",
confirmButtonTitle = "예약하기",
title = getString(
R.string.screen_live_reservation_pay_title,
it.price.moneyFormat()
),
desc = getString(R.string.screen_live_reservation_pay_desc, it.title),
confirmButtonTitle = getString(R.string.screen_live_reservation_confirm),
confirmButtonClick = { processLiveReservation(roomId) },
cancelButtonTitle = "취소",
cancelButtonTitle = getString(R.string.cancel),
cancelButtonClick = {}
).show(screenWidth)
}
@@ -259,21 +262,21 @@ class LiveReservationAllActivity : BaseActivity<ActivityLiveReservationAllBindin
LiveCancelDialog(
activity = this,
layoutInflater = layoutInflater,
title = "예약취소",
hint = "취소사유를 입력하세요.",
confirmButtonTitle = "예약취소",
title = getString(R.string.screen_live_cancel_title),
hint = getString(R.string.screen_live_cancel_hint),
confirmButtonTitle = getString(R.string.screen_live_cancel_confirm),
confirmButtonClick = {
viewModel.cancelLive(roomId, it) {
Toast.makeText(
applicationContext,
"예약이 취소되었습니다.",
getString(R.string.screen_live_cancel_success),
Toast.LENGTH_LONG
).show()
adapter.clear()
refresh()
}
},
cancelButtonTitle = "닫기",
cancelButtonTitle = getString(R.string.dialog_close),
cancelButtonClick = {}
).show(screenWidth)
}