라이브룸 문자열 리소스화 마무리
This commit is contained in:
@@ -285,7 +285,7 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
|
||||
compressFormat = Bitmap.CompressFormat.JPEG,
|
||||
compressQuality = 90
|
||||
),
|
||||
onSuccess = { file, uri ->
|
||||
onSuccess = { file, _ ->
|
||||
roomInfoEditDialog.setCoverImageUri(file)
|
||||
},
|
||||
onError = { e ->
|
||||
@@ -818,17 +818,17 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
|
||||
newTitle,
|
||||
newContent,
|
||||
newCoverImageFile,
|
||||
isActivateMenu,
|
||||
menuId,
|
||||
menu,
|
||||
isAdult,
|
||||
onSuccess = {
|
||||
cropper.cleanup()
|
||||
Toast.makeText(
|
||||
applicationContext,
|
||||
getString(R.string.screen_live_room_info_updated),
|
||||
Toast.LENGTH_LONG
|
||||
).show()
|
||||
isActivateMenu,
|
||||
menuId,
|
||||
menu,
|
||||
isAdult,
|
||||
onSuccess = {
|
||||
cropper.cleanup()
|
||||
Toast.makeText(
|
||||
applicationContext,
|
||||
getString(R.string.screen_live_room_info_updated),
|
||||
Toast.LENGTH_LONG
|
||||
).show()
|
||||
|
||||
agora.sendRawMessageToGroup(
|
||||
rawMessage = Gson().toJson(
|
||||
@@ -1885,7 +1885,8 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
|
||||
// endregion
|
||||
|
||||
// region heart
|
||||
private val heartMessageQueue = mutableListOf<Pair<String, Long>>() // Pair<nickname, durationMs>
|
||||
private val heartMessageQueue =
|
||||
mutableListOf<Pair<String, Long>>() // Pair<nickname, durationMs>
|
||||
private var currentHeartMessageDurationMs: Long = 1500L
|
||||
private var heartNickname = ""
|
||||
set(value) {
|
||||
@@ -2204,25 +2205,30 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
|
||||
private fun showHeartMessage() {
|
||||
val str = getString(R.string.screen_live_room_heart_sent, heartNickname)
|
||||
val spStr = SpannableString(str)
|
||||
// 로케일별 따옴표/접미사가 달라 예외가 발생하지 않도록, 실제 닉네임 위치를 기준으로 강조 처리한다.
|
||||
val nicknameStart = str.indexOf(heartNickname).takeIf { it >= 0 }
|
||||
val nicknameEnd = nicknameStart?.plus(heartNickname.length)
|
||||
|
||||
spStr.setSpan(
|
||||
ForegroundColorSpan(
|
||||
ContextCompat.getColor(
|
||||
applicationContext,
|
||||
R.color.color_ec3aa6
|
||||
)
|
||||
),
|
||||
str.indexOf("'") + 1,
|
||||
str.indexOf("'님"),
|
||||
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE
|
||||
)
|
||||
if (nicknameStart != null && nicknameEnd != null) {
|
||||
spStr.setSpan(
|
||||
ForegroundColorSpan(
|
||||
ContextCompat.getColor(
|
||||
applicationContext,
|
||||
R.color.color_ec3aa6
|
||||
)
|
||||
),
|
||||
nicknameStart,
|
||||
nicknameEnd,
|
||||
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE
|
||||
)
|
||||
|
||||
spStr.setSpan(
|
||||
StyleSpan(Typeface.BOLD),
|
||||
str.indexOf("'"),
|
||||
str.indexOf("'님"),
|
||||
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE
|
||||
)
|
||||
spStr.setSpan(
|
||||
StyleSpan(Typeface.BOLD),
|
||||
nicknameStart,
|
||||
nicknameEnd,
|
||||
Spanned.SPAN_EXCLUSIVE_EXCLUSIVE
|
||||
)
|
||||
}
|
||||
binding.tvHeartMessage.text = spStr
|
||||
binding.tvHeartMessage.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import android.view.View
|
||||
import android.view.WindowManager
|
||||
import android.widget.Toast
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import kr.co.vividnext.sodalive.R
|
||||
import kr.co.vividnext.sodalive.databinding.DialogLiveInputBinding
|
||||
import kr.co.vividnext.sodalive.extensions.dpToPx
|
||||
|
||||
@@ -47,7 +48,11 @@ class LiveCancelDialog(
|
||||
alertDialog.dismiss()
|
||||
confirmButtonClick(dialogView.etReason.text.toString())
|
||||
} else {
|
||||
Toast.makeText(activity, "취소사유를 입력하세요.", Toast.LENGTH_LONG).show()
|
||||
Toast.makeText(
|
||||
activity,
|
||||
activity.getString(R.string.screen_live_room_cancel_reason_required),
|
||||
Toast.LENGTH_LONG
|
||||
).show()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ import com.jakewharton.rxbinding4.widget.textChanges
|
||||
import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.rxjava3.disposables.CompositeDisposable
|
||||
import io.reactivex.rxjava3.schedulers.Schedulers
|
||||
import kr.co.vividnext.sodalive.R
|
||||
import kr.co.vividnext.sodalive.databinding.DialogLiveRoomPasswordBinding
|
||||
import kr.co.vividnext.sodalive.extensions.dpToPx
|
||||
import kr.co.vividnext.sodalive.extensions.moneyFormat
|
||||
@@ -38,10 +39,11 @@ class LiveRoomPasswordDialog(
|
||||
if (can > 0) {
|
||||
dialogView.tvCan.visibility = View.VISIBLE
|
||||
dialogView.tvCan.text = can.moneyFormat()
|
||||
dialogView.tvConfirm.text = "으로 입장"
|
||||
dialogView.tvConfirm.text =
|
||||
activity.getString(R.string.screen_live_room_enter_with_amount_suffix)
|
||||
} else {
|
||||
dialogView.tvCan.visibility = View.GONE
|
||||
dialogView.tvConfirm.text = "입장하기"
|
||||
dialogView.tvConfirm.text = activity.getString(R.string.screen_live_room_enter)
|
||||
}
|
||||
|
||||
compositeDisposable.add(
|
||||
|
||||
@@ -364,12 +364,20 @@ class LiveRoomInfoEditDialog(
|
||||
selectedMenuPreset == LiveRoomCreateViewModel.SelectedMenu.MENU_3
|
||||
)
|
||||
) {
|
||||
Toast.makeText(activity, "메뉴 1을 먼저 설정하세요", Toast.LENGTH_SHORT).show()
|
||||
Toast.makeText(
|
||||
activity,
|
||||
activity.getString(R.string.screen_live_room_menu_first_required),
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
return
|
||||
}
|
||||
|
||||
if (menuList.size == 1 && selectedMenuPreset == LiveRoomCreateViewModel.SelectedMenu.MENU_3) {
|
||||
Toast.makeText(activity, "메뉴 1과 메뉴 2를 먼저 설정하세요", Toast.LENGTH_SHORT).show()
|
||||
Toast.makeText(
|
||||
activity,
|
||||
activity.getString(R.string.screen_live_room_menu_first_second_required),
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user