라이브 방
- 채팅창 너비 축소 - 오른쪽 하단 옵션 버튼 baseline이 채팅창 baseline과 동일하게 설정 - 좋아요(누르면 1캔 후원) 버튼 추가 - 좋아요 개수 UI - 후원 캔 왼쪽에 추가
This commit is contained in:
@@ -21,6 +21,7 @@ import android.text.method.LinkMovementMethod
|
||||
import android.text.style.ClickableSpan
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
import android.widget.TextView
|
||||
import android.widget.Toast
|
||||
@@ -467,6 +468,15 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
|
||||
binding.ivSpeakerMute.setImageResource(R.drawable.ic_speaker_on)
|
||||
}
|
||||
}
|
||||
|
||||
binding.etChat.setOnEditorActionListener { _, actionId, _ ->
|
||||
if (actionId == EditorInfo.IME_ACTION_DONE || actionId == EditorInfo.IME_ACTION_SEND) {
|
||||
inputChat()
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
binding.ivSend.setOnClickListener { inputChat() }
|
||||
binding.flDonation.setOnClickListener {
|
||||
val dialog = LiveRoomDonationDialog(
|
||||
@@ -894,6 +904,7 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
|
||||
binding.ivCreatorFollow.visibility = View.GONE
|
||||
}
|
||||
|
||||
initLikeHeartButton(isHost = response.creatorId == SharedPreferenceManager.userId)
|
||||
initRouletteSettingButton(isHost = response.creatorId == SharedPreferenceManager.userId)
|
||||
activatingRouletteButton(
|
||||
isHost = response.creatorId == SharedPreferenceManager.userId,
|
||||
@@ -974,11 +985,24 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
|
||||
binding.tvTotalCan.text = it.moneyFormat()
|
||||
}
|
||||
|
||||
viewModel.totalLikeHeart.observe(this) {
|
||||
binding.tvTotalHeart.text = it.moneyFormat()
|
||||
}
|
||||
|
||||
viewModel.coverImageUrlLiveData.observe(this) {
|
||||
binding.ivCover.loadUrl(it)
|
||||
}
|
||||
}
|
||||
|
||||
private fun initLikeHeartButton(isHost: Boolean) {
|
||||
if (!isHost) {
|
||||
binding.flLikeHeart.visibility = View.VISIBLE
|
||||
binding.flLikeHeart.setOnClickListener { }
|
||||
} else {
|
||||
binding.flLikeHeart.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
private fun initRouletteSettingButton(isHost: Boolean) {
|
||||
if (isHost) {
|
||||
binding.flRouletteSettings.visibility = View.VISIBLE
|
||||
|
||||
@@ -64,6 +64,10 @@ class LiveRoomViewModel(
|
||||
val totalDonationCan: LiveData<Int>
|
||||
get() = _totalDonationCan
|
||||
|
||||
private val _totalLikeHeart = MutableLiveData(0)
|
||||
val totalLikeHeart: LiveData<Int>
|
||||
get() = _totalLikeHeart
|
||||
|
||||
private val _userProfileLiveData = MutableLiveData<GetLiveRoomUserProfileResponse>()
|
||||
val userProfileLiveData: LiveData<GetLiveRoomUserProfileResponse>
|
||||
get() = _userProfileLiveData
|
||||
|
||||
Reference in New Issue
Block a user