라이브 - 공지 활성화/비활성화 버튼 색 변경
This commit is contained in:
parent
8456f2b30b
commit
7ada4515aa
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
android:layout_marginHorizontal="13.3dp"
|
||||
android:layout_marginBottom="13.3dp"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@+id/rl_input_chat"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
@ -171,7 +172,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_round_corner_5_3_transparent_bbbbbb"
|
||||
android:contentDescription="@null"
|
||||
android:padding="2.7dp"
|
||||
android:padding="4dp"
|
||||
android:src="@drawable/ic_edit"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
|
@ -304,13 +305,13 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:background="@drawable/bg_round_corner_5_3_transparent_3bb9f1"
|
||||
android:background="@drawable/bg_round_corner_5_3_transparent_bbbbbb"
|
||||
android:drawablePadding="2.7dp"
|
||||
android:fontFamily="@font/gmarket_sans_medium"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:paddingVertical="5.3dp"
|
||||
android:text="공지"
|
||||
android:textColor="@color/color_3bb9f1"
|
||||
android:textColor="@color/color_bbbbbb"
|
||||
android:textSize="12sp"
|
||||
tools:ignore="SmallSp" />
|
||||
|
||||
|
|
Loading…
Reference in New Issue