feat(profile): 채널 후원 영역과 전체보기 흐름을 추가한다
This commit is contained in:
@@ -4,6 +4,7 @@ import android.annotation.SuppressLint
|
||||
import android.content.Intent
|
||||
import android.graphics.Color
|
||||
import android.graphics.drawable.ColorDrawable
|
||||
import android.text.InputFilter
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.WindowManager
|
||||
@@ -26,6 +27,7 @@ class LiveRoomDonationDialog(
|
||||
private val activity: AppCompatActivity,
|
||||
layoutInflater: LayoutInflater,
|
||||
isLiveDonation: Boolean = false,
|
||||
messageMaxLength: Int = 1000,
|
||||
onClickDonation: (Int, String, Boolean) -> Unit
|
||||
) {
|
||||
|
||||
@@ -47,11 +49,17 @@ class LiveRoomDonationDialog(
|
||||
bottomSheetBehavior.skipCollapsed = true
|
||||
}
|
||||
|
||||
dialogView.etDonationMessage.filters = arrayOf(InputFilter.LengthFilter(messageMaxLength))
|
||||
dialogView.etDonationMessage.hint = activity.getString(
|
||||
R.string.screen_live_room_donation_message_hint_format,
|
||||
messageMaxLength
|
||||
)
|
||||
|
||||
dialogView.tvCancel.setOnClickListener { bottomSheetDialog.dismiss() }
|
||||
dialogView.tvDonation.setOnClickListener {
|
||||
try {
|
||||
val can = dialogView.etDonationCan.text.toString().toInt()
|
||||
val message = dialogView.etDonationMessage.text.toString().prefix(1000)
|
||||
val message = dialogView.etDonationMessage.text.toString().prefix(messageMaxLength)
|
||||
|
||||
if (isLiveDonation) {
|
||||
val isSecret = dialogView.tvSecret.isSelected
|
||||
@@ -99,9 +107,15 @@ class LiveRoomDonationDialog(
|
||||
val isSelected = dialogView.tvSecret.isSelected
|
||||
dialogView.tvSecret.isSelected = !isSelected
|
||||
dialogView.etDonationMessage.hint = if (!isSelected) {
|
||||
activity.getString(R.string.screen_live_room_secret_mission_hint)
|
||||
activity.getString(
|
||||
R.string.screen_live_room_secret_mission_hint_format,
|
||||
messageMaxLength
|
||||
)
|
||||
} else {
|
||||
activity.getString(R.string.screen_live_room_donation_message_hint)
|
||||
activity.getString(
|
||||
R.string.screen_live_room_donation_message_hint_format,
|
||||
messageMaxLength
|
||||
)
|
||||
}
|
||||
dialogView.etDonationCan.hint = if (!isSelected) {
|
||||
activity.getString(R.string.screen_live_room_secret_mission_input_min)
|
||||
|
||||
Reference in New Issue
Block a user