라이브 - 공지 활성화/비활성화 버튼 색 변경
This commit is contained in:
parent
8456f2b30b
commit
7ada4515aa
|
@ -47,7 +47,7 @@ class Agora(
|
||||||
Constants.AUDIO_SCENARIO_GAME_STREAMING
|
Constants.AUDIO_SCENARIO_GAME_STREAMING
|
||||||
)
|
)
|
||||||
rtcEngine!!.enableAudio()
|
rtcEngine!!.enableAudio()
|
||||||
rtcEngine!!.enableAudioVolumeIndication(500, 3, false)
|
rtcEngine!!.enableAudioVolumeIndication(500, 3, true)
|
||||||
|
|
||||||
rtmClient = RtmClient.createInstance(
|
rtmClient = RtmClient.createInstance(
|
||||||
context,
|
context,
|
||||||
|
|
|
@ -820,8 +820,28 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
|
||||||
|
|
||||||
viewModel.isShowNotice.observe(this) {
|
viewModel.isShowNotice.observe(this) {
|
||||||
if (it) {
|
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
|
binding.llNotice.visibility = View.VISIBLE
|
||||||
} else {
|
} 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
|
binding.llNotice.visibility = View.GONE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1469,6 +1489,9 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
|
||||||
totalVolume: Int
|
totalVolume: Int
|
||||||
) {
|
) {
|
||||||
super.onAudioVolumeIndication(speakers, totalVolume)
|
super.onAudioVolumeIndication(speakers, totalVolume)
|
||||||
|
|
||||||
|
Logger.e("onAudioVolumeIndication - $speakers")
|
||||||
|
|
||||||
val activeSpeakerIds = speakers
|
val activeSpeakerIds = speakers
|
||||||
.asSequence()
|
.asSequence()
|
||||||
.filter { it.volume > 0 }
|
.filter { it.volume > 0 }
|
||||||
|
@ -1477,14 +1500,16 @@ class LiveRoomActivity : BaseActivity<ActivityLiveRoomBinding>(ActivityLiveRoomB
|
||||||
|
|
||||||
Logger.e("onAudioVolumeIndication - $activeSpeakerIds")
|
Logger.e("onAudioVolumeIndication - $activeSpeakerIds")
|
||||||
handler.post {
|
handler.post {
|
||||||
speakerListAdapter.activeSpeakers.clear()
|
if (!activeSpeakerIds.contains(0)) {
|
||||||
speakerListAdapter.activeSpeakers.addAll(activeSpeakerIds)
|
speakerListAdapter.activeSpeakers.clear()
|
||||||
speakerListAdapter.notifyDataSetChanged()
|
speakerListAdapter.activeSpeakers.addAll(activeSpeakerIds)
|
||||||
|
speakerListAdapter.notifyDataSetChanged()
|
||||||
|
|
||||||
if (activeSpeakerIds.contains(viewModel.roomInfoResponse.creatorId.toInt())) {
|
if (activeSpeakerIds.contains(viewModel.roomInfoResponse.creatorId.toInt())) {
|
||||||
binding.ivCreatorProfileBg.visibility = View.VISIBLE
|
binding.ivCreatorProfileBg.visibility = View.VISIBLE
|
||||||
} else {
|
} else {
|
||||||
binding.ivCreatorProfileBg.visibility = View.GONE
|
binding.ivCreatorProfileBg.visibility = View.GONE
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,6 +56,7 @@
|
||||||
android:layout_marginHorizontal="13.3dp"
|
android:layout_marginHorizontal="13.3dp"
|
||||||
android:layout_marginBottom="13.3dp"
|
android:layout_marginBottom="13.3dp"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
|
android:visibility="gone"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/rl_input_chat"
|
app:layout_constraintBottom_toTopOf="@+id/rl_input_chat"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
@ -171,7 +172,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/bg_round_corner_5_3_transparent_bbbbbb"
|
android:background="@drawable/bg_round_corner_5_3_transparent_bbbbbb"
|
||||||
android:contentDescription="@null"
|
android:contentDescription="@null"
|
||||||
android:padding="2.7dp"
|
android:padding="4dp"
|
||||||
android:src="@drawable/ic_edit"
|
android:src="@drawable/ic_edit"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -304,13 +305,13 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentStart="true"
|
android:layout_alignParentStart="true"
|
||||||
android:layout_centerVertical="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:drawablePadding="2.7dp"
|
||||||
android:fontFamily="@font/gmarket_sans_medium"
|
android:fontFamily="@font/gmarket_sans_medium"
|
||||||
android:paddingHorizontal="8dp"
|
android:paddingHorizontal="8dp"
|
||||||
android:paddingVertical="5.3dp"
|
android:paddingVertical="5.3dp"
|
||||||
android:text="공지"
|
android:text="공지"
|
||||||
android:textColor="@color/color_3bb9f1"
|
android:textColor="@color/color_bbbbbb"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
tools:ignore="SmallSp" />
|
tools:ignore="SmallSp" />
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue