小时榜飘屏 更换背景图
This commit is contained in:
@@ -181,7 +181,7 @@ class RoomEffectBoxView @JvmOverloads constructor(
|
||||
|
||||
RoomEvent.ROOM_PK_NOTIFY -> addRoomPKNotify(roomEvent.chatRoomMessage)
|
||||
RoomEvent.SINGLE_ROOM_PK_NOTIFY -> addSingleRoomPKNotify(roomEvent.chatRoomMessage)
|
||||
RoomEvent.SINGLE_ROOM_RANK_TOP_NOTIFY -> showSingleRoomRankNotify(roomEvent.chatRoomMessage)
|
||||
RoomEvent.SINGLE_ROOM_RANK_TOP_NOTIFY -> showRoomRankNotify(roomEvent.chatRoomMessage)
|
||||
RoomEvent.ROOM_RANK_TOP_NOTIFY -> showRoomRankNotify(roomEvent.chatRoomMessage)
|
||||
RoomEvent.ROOM_CAR_EFFECT_HIDE -> {
|
||||
isHideCarEffect = true
|
||||
@@ -1219,27 +1219,6 @@ class RoomEffectBoxView @JvmOverloads constructor(
|
||||
)
|
||||
}
|
||||
|
||||
private fun showSingleRoomRankNotify(chatRoomMessage: ChatRoomMessage) {
|
||||
if (binding.clNotify.visibility == GONE) {
|
||||
binding.clNotify.visibility = VISIBLE
|
||||
}
|
||||
val roomPkBean = (chatRoomMessage.attachment as SingleRoomRankAttachment).msgBean
|
||||
val rootView =
|
||||
LayoutInflater.from(mContext).inflate(R.layout.layout_single_room_rank_notify, null)
|
||||
(rootView.findViewById<View>(R.id.tv_nick) as TextView).text =
|
||||
roomPkBean.nick.subAndReplaceDot(6)
|
||||
(rootView.findViewById<View>(R.id.tv_desc) as TextView).text = roomPkBean.desc
|
||||
rootView.findViewById<ImageView>(R.id.iv_avatar).load(roomPkBean.avatar)
|
||||
rootView.setOnClickListener { AVRoomActivity.start(context, roomPkBean.uid) }
|
||||
binding.flSingleRoomRankNotify.addView(rootView)
|
||||
animationLuckyGift = AnimationUtils.loadAnimation(mContext, R.anim.anim_box_notify)
|
||||
rootView.startAnimation(animationLuckyGift)
|
||||
binding.flSingleRoomRankNotify.postDelayed({
|
||||
binding.flSingleRoomRankNotify.removeView(
|
||||
rootView
|
||||
)
|
||||
}, SHOW_TIME.toLong())
|
||||
}
|
||||
|
||||
private fun showRoomRankNotify(chatRoomMessage: ChatRoomMessage) {
|
||||
if (binding.clNotify.visibility == GONE) {
|
||||
|
@@ -229,7 +229,7 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
|
||||
RoomEvent.ROOM_PK_NOTIFY -> addRoomPKNotify(roomEvent.chatRoomMessage)
|
||||
RoomEvent.SINGLE_ROOM_PK_NOTIFY -> addSingleRoomPKNotify(roomEvent.chatRoomMessage)
|
||||
RoomEvent.SINGLE_ROOM_RANK_TOP_NOTIFY -> showSingleRoomRankNotify(roomEvent.chatRoomMessage)
|
||||
RoomEvent.SINGLE_ROOM_RANK_TOP_NOTIFY -> showRoomRankNotify(roomEvent.chatRoomMessage)
|
||||
RoomEvent.ROOM_RANK_TOP_NOTIFY -> showRoomRankNotify(roomEvent.chatRoomMessage)
|
||||
RoomEvent.ROOM_CAR_EFFECT_HIDE -> {
|
||||
isHideCarEffect = true
|
||||
@@ -1899,27 +1899,6 @@ class RoomEffectView @JvmOverloads constructor(
|
||||
)
|
||||
}
|
||||
|
||||
private fun showSingleRoomRankNotify(chatRoomMessage: ChatRoomMessage) {
|
||||
if (binding.clNotify.visibility == GONE) {
|
||||
binding.clNotify.visibility = VISIBLE
|
||||
}
|
||||
val roomPkBean = (chatRoomMessage.attachment as SingleRoomRankAttachment).msgBean
|
||||
val rootView =
|
||||
LayoutInflater.from(mContext).inflate(R.layout.layout_single_room_rank_notify, null)
|
||||
(rootView.findViewById<View>(R.id.tv_nick) as TextView).text =
|
||||
roomPkBean.nick.subAndReplaceDot(6)
|
||||
(rootView.findViewById<View>(R.id.tv_desc) as TextView).text = roomPkBean.desc
|
||||
rootView.findViewById<ImageView>(R.id.iv_avatar).load(roomPkBean.avatar)
|
||||
rootView.setOnClickListener { AVRoomActivity.start(context, roomPkBean.uid) }
|
||||
binding.flSingleRoomRankNotify.addView(rootView)
|
||||
animationLuckyGift = AnimationUtils.loadAnimation(mContext, R.anim.anim_box_notify)
|
||||
rootView.startAnimation(animationLuckyGift)
|
||||
binding.flSingleRoomRankNotify.postDelayed({
|
||||
binding.flSingleRoomRankNotify.removeView(
|
||||
rootView
|
||||
)
|
||||
}, SHOW_TIME.toLong())
|
||||
}
|
||||
|
||||
private fun showRoomRankNotify(chatRoomMessage: ChatRoomMessage) {
|
||||
if (binding.clNotify.visibility == GONE) {
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 4.2 KiB |
BIN
app/src/main/res/drawable-xhdpi/room_bg_rank_go_room.webp
Normal file
BIN
app/src/main/res/drawable-xhdpi/room_bg_rank_go_room.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.8 KiB |
Binary file not shown.
Before Width: | Height: | Size: 74 KiB |
BIN
app/src/main/res/drawable-xhdpi/room_bg_rank_notice.webp
Normal file
BIN
app/src/main/res/drawable-xhdpi/room_bg_rank_notice.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
Binary file not shown.
Before Width: | Height: | Size: 59 KiB |
Binary file not shown.
Before Width: | Height: | Size: 4.2 KiB |
@@ -4,7 +4,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:background="@drawable/single_room_bg_rank_notice"
|
||||
android:background="@drawable/room_bg_rank_notice"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
android:paddingTop="4dp"
|
||||
|
Reference in New Issue
Block a user