유료방 입장 팝업

- UI 수정
- 알림 문구 수정
This commit is contained in:
klaus 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

View File

@ -17,7 +17,7 @@
android:gravity="center"
android:textColor="@color/color_bbbbbb"
android:textSize="18.3sp"
tools:text="100캔으로 입장" />
tools:text="유료라이브 입장" />
<TextView
android:id="@+id/tv_desc"
@ -25,52 +25,38 @@
android:layout_height="wrap_content"
android:layout_marginTop="21.3dp"
android:fontFamily="@font/gmarket_sans_medium"
android:gravity="center"
android:lineSpacingExtra="4sp"
android:textColor="@color/color_bbbbbb"
android:textSize="15sp"
android:visibility="gone"
tools:text="'테스트' 라이브에 참여하기 위해 결제합니다.'테스트' 라이브에 참여하기 위해 결제합니다.'테스트' 라이브에 참여하기 위해 결제합니다." />
tools:text="OO캔을 차감하고\n라이브에 입장 하시겠습니까?" />
<LinearLayout
android:id="@+id/ll_time_notice"
android:layout_width="match_parent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="21.3dp"
android:background="@drawable/bg_round_corner_13_3_303030"
android:orientation="horizontal"
android:padding="13.3dp"
android:visibility="gone">
android:baselineAligned="false"
android:gravity="center"
android:orientation="vertical"
android:paddingHorizontal="26.7dp"
android:paddingVertical="13.3dp"
>
<LinearLayout
android:layout_width="0dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/gmarket_sans_medium"
android:text="시작 시각"
android:text="- 시작 시각 : "
android:textColor="@color/color_bbbbbb"
android:textSize="13.3sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="13.3dp"
android:fontFamily="@font/gmarket_sans_medium"
android:text="현재 시각"
android:textColor="@color/color_bbbbbb"
android:textSize="13.3sp" />
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/tv_start_date"
android:layout_width="wrap_content"
@ -79,6 +65,21 @@
android:textColor="@color/color_bbbbbb"
android:textSize="13.3sp"
tools:text="2024-01-01 15:30" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="13.3dp"
android:fontFamily="@font/gmarket_sans_medium"
android:text="- 현재 시각 : "
android:textColor="@color/color_bbbbbb"
android:textSize="13.3sp" />
<TextView
android:id="@+id/tv_now_date"
@ -101,8 +102,7 @@
android:lineSpacingExtra="4sp"
android:textColor="@color/color_bbbbbb"
android:textSize="15sp"
android:visibility="gone"
tools:text="안내 문구" />
tools:text="라이브가 시작한 지 1시간 10분이 지났습니다. 라이브에 입장 후 30분 이내에 라이브가 종료될 수도 있습니다." />
<LinearLayout
android:layout_width="match_parent"