유료방 입장 팝업

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

View File

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

View File

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

View File

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

View File

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