라이브 - 공지 활성화/비활성화 버튼 색 변경
This commit is contained in:
@@ -47,7 +47,7 @@ class Agora(
|
||||
Constants.AUDIO_SCENARIO_GAME_STREAMING
|
||||
)
|
||||
rtcEngine!!.enableAudio()
|
||||
rtcEngine!!.enableAudioVolumeIndication(500, 3, false)
|
||||
rtcEngine!!.enableAudioVolumeIndication(500, 3, true)
|
||||
|
||||
rtmClient = RtmClient.createInstance(
|
||||
context,
|
||||
|
@@ -820,8 +820,28 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
|
||||
|
||||
viewModel.isShowNotice.observe(this) {
|
||||
if (it) {
|
||||
binding.tvNotification.setTextColor(
|
||||
ContextCompat.getColor(
|
||||
applicationContext,
|
||||
R.color.color_3bb9f1
|
||||
)
|
||||
)
|
||||
binding.tvNotification.setBackgroundResource(
|
||||
R.drawable.bg_round_corner_5_3_transparent_3bb9f1
|
||||
)
|
||||
|
||||
binding.llNotice.visibility = View.VISIBLE
|
||||
} else {
|
||||
binding.tvNotification.setTextColor(
|
||||
ContextCompat.getColor(
|
||||
applicationContext,
|
||||
R.color.color_bbbbbb
|
||||
)
|
||||
)
|
||||
binding.tvNotification.setBackgroundResource(
|
||||
R.drawable.bg_round_corner_5_3_transparent_bbbbbb
|
||||
)
|
||||
|
||||
binding.llNotice.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
@@ -1469,6 +1489,9 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
|
||||
totalVolume: Int
|
||||
) {
|
||||
super.onAudioVolumeIndication(speakers, totalVolume)
|
||||
|
||||
Logger.e("onAudioVolumeIndication - $speakers")
|
||||
|
||||
val activeSpeakerIds = speakers
|
||||
.asSequence()
|
||||
.filter { it.volume > 0 }
|
||||
@@ -1477,14 +1500,16 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
|
||||
|
||||
Logger.e("onAudioVolumeIndication - $activeSpeakerIds")
|
||||
handler.post {
|
||||
speakerListAdapter.activeSpeakers.clear()
|
||||
speakerListAdapter.activeSpeakers.addAll(activeSpeakerIds)
|
||||
speakerListAdapter.notifyDataSetChanged()
|
||||
if (!activeSpeakerIds.contains(0)) {
|
||||
speakerListAdapter.activeSpeakers.clear()
|
||||
speakerListAdapter.activeSpeakers.addAll(activeSpeakerIds)
|
||||
speakerListAdapter.notifyDataSetChanged()
|
||||
|
||||
if (activeSpeakerIds.contains(viewModel.roomInfoResponse.creatorId.toInt())) {
|
||||
binding.ivCreatorProfileBg.visibility = View.VISIBLE
|
||||
} else {
|
||||
binding.ivCreatorProfileBg.visibility = View.GONE
|
||||
if (activeSpeakerIds.contains(viewModel.roomInfoResponse.creatorId.toInt())) {
|
||||
binding.ivCreatorProfileBg.visibility = View.VISIBLE
|
||||
} else {
|
||||
binding.ivCreatorProfileBg.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user