유료방 입장 팝업

- UI 수정
- 알림 문구 수정
This commit is contained in:
2024-01-22 16:09:53 +09:00
parent b33c8ffd6d
commit 6fbb98ca7b
5 changed files with 50 additions and 50 deletions

View File

@@ -855,7 +855,7 @@ class UserProfileActivity : BaseActivity<ActivityUserProfileBinding>(
val beginDate = beginDateFormat.parse(it.beginDateTime)!!
val now = Date()
val dateFormat = SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.getDefault())
val dateFormat = SimpleDateFormat("yyyy-MM-dd, HH:mm", Locale.getDefault())
val diffTime: Long = now.time - beginDate.time
val hours = (diffTime / (1000 * 60 * 60)).toInt()
val mins = (diffTime / (1000 * 60)).toInt() % 60
@@ -877,7 +877,7 @@ class UserProfileActivity : BaseActivity<ActivityUserProfileBinding>(
LivePaymentDialog(
activity = this,
layoutInflater = layoutInflater,
title = "${it.price.moneyFormat()}캔으로 입장",
title = "유료 라이브 입장",
startDateTime = if (hours >= 1) {
dateFormat.format(beginDate)
} else {
@@ -888,10 +888,11 @@ class UserProfileActivity : BaseActivity<ActivityUserProfileBinding>(
} else {
null
},
desc = if (hours >= 1) {
"라이브를 시작한지 ${hours}시간 ${mins}분 이상 지났습니다. 결제 후 참여하시겠습니까?"
desc = "${it.price}캔을 차감하고\n라이브에 입장 하시겠습니까?",
desc2 = if (hours >= 1) {
"라이브를 시작한 지 ${hours}시간 ${mins}분이 지났습니다. 라이브에 입장 후 30분 이내에 라이브가 종료될 수도 있습니다."
} else {
"'${it.title}' 라이브에 참여하기 위해 결제합니다."
null
},
confirmButtonTitle = "결제 후 입장",
confirmButtonClick = {

View File

@@ -702,7 +702,7 @@ class LiveFragment : BaseFragment<FragmentLiveBinding>(FragmentLiveBinding::infl
val beginDate = beginDateFormat.parse(it.beginDateTime)!!
val now = Date()
val dateFormat = SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.getDefault())
val dateFormat = SimpleDateFormat("yyyy-MM-dd, HH:mm", Locale.getDefault())
val diffTime: Long = now.time - beginDate.time
val hours = (diffTime / (1000 * 60 * 60)).toInt()
val mins = (diffTime / (1000 * 60)).toInt() % 60
@@ -726,7 +726,7 @@ class LiveFragment : BaseFragment<FragmentLiveBinding>(FragmentLiveBinding::infl
LivePaymentDialog(
activity = requireActivity(),
layoutInflater = layoutInflater,
title = "${it.price.moneyFormat()}캔으로 입장",
title = "유료 라이브 입장",
startDateTime = if (hours >= 1) {
dateFormat.format(beginDate)
} else {
@@ -737,10 +737,11 @@ class LiveFragment : BaseFragment<FragmentLiveBinding>(FragmentLiveBinding::infl
} else {
null
},
desc = if (hours >= 1) {
"라이브를 시작한지 ${hours}시간 ${mins}분 이상 지났습니다. 결제 후 참여하시겠습니까?"
desc = "${it.price}캔을 차감하고\n라이브에 입장 하시겠습니까?",
desc2 = if (hours >= 1) {
"라이브를 시작한 지 ${hours}시간 ${mins}분이 지났습니다. 라이브에 입장 후 30분 이내에 라이브가 종료될 수도 있습니다."
} else {
"'${it.title}' 라이브에 참여하기 위해 결제합니다."
null
},
confirmButtonTitle = "결제 후 입장",
confirmButtonClick = {

View File

@@ -164,7 +164,7 @@ class LiveNowAllActivity : BaseActivity<ActivityLiveNowAllBinding>(
val beginDate = beginDateFormat.parse(it.beginDateTime)!!
val now = Date()
val dateFormat = SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.getDefault())
val dateFormat = SimpleDateFormat("yyyy-MM-dd, HH:mm", Locale.getDefault())
val diffTime: Long = now.time - beginDate.time
val hours = (diffTime / (1000 * 60 * 60)).toInt()
val mins = (diffTime / (1000 * 60)).toInt() % 60
@@ -186,7 +186,7 @@ class LiveNowAllActivity : BaseActivity<ActivityLiveNowAllBinding>(
LivePaymentDialog(
activity = this,
layoutInflater = layoutInflater,
title = "${it.price.moneyFormat()} 캔으로 입장",
title = "유료 라이브 입장",
startDateTime = if (hours >= 1) {
dateFormat.format(beginDate)
} else {
@@ -197,10 +197,11 @@ class LiveNowAllActivity : BaseActivity<ActivityLiveNowAllBinding>(
} else {
null
},
desc = if (hours >= 1) {
"라이브를 시작한지 ${hours}시간 ${mins}분 이상 지났습니다. 결제 후 참여하시겠습니까?"
desc = "${it.price.moneyFormat()}캔을 차감하고\n라이브에 입장 하시겠습니까?",
desc2 = if (hours >= 1) {
"라이브를 시작한 지 ${hours}시간 ${mins}분이 지났습니다. 라이브에 입장 후 30분 이내에 라이브가 종료될 수도 있습니다."
} else {
"'${it.title}' 라이브에 참여하기 위해 결제합니다."
null
},
confirmButtonTitle = "결제 후 입장",
confirmButtonClick = {

View File

@@ -15,6 +15,7 @@ class LivePaymentDialog(
layoutInflater: LayoutInflater,
title: String,
desc: String,
desc2: String? = null,
startDateTime: String? = null,
nowDateTime: String? = null,
confirmButtonTitle: String,
@@ -34,11 +35,10 @@ class LivePaymentDialog(
alertDialog.window?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
dialogView.tvTitle.text = title
dialogView.tvDesc.text = desc
if (startDateTime != null && nowDateTime != null) {
dialogView.tvDesc.visibility = View.GONE
dialogView.tvDesc2.text = desc
dialogView.tvDesc2.text = desc2
dialogView.tvNowDate.text = nowDateTime
dialogView.tvStartDate.text = startDateTime
@@ -47,9 +47,6 @@ class LivePaymentDialog(
} else {
dialogView.tvDesc2.visibility = View.GONE
dialogView.llTimeNotice.visibility = View.GONE
dialogView.tvDesc.text = desc
dialogView.tvDesc.visibility = View.VISIBLE
}
dialogView.tvCancel.text = cancelButtonTitle