拍照房小时榜飘屏UI修改

This commit is contained in:
huangjian
2022-06-13 17:33:02 +08:00
parent 8b1173e384
commit 50b4564c83
5 changed files with 23 additions and 47 deletions

View File

@@ -1664,7 +1664,7 @@ public class MessageView extends FrameLayout {
text.append(" x" + attachment.getPrizeNum() + " ", new ForegroundColorSpan(roomTipColor));
}
if (attachment.getSecond() == CUSTOM_MSG_SUB_BOX_ME) {
text.append("仅自己可见", new ForegroundColorSpan(Color.WHITE));
text.append("(仅自己可见)", new ForegroundColorSpan(Color.WHITE));
}
tvContent.setText(text.build());
}

View File

@@ -1020,10 +1020,13 @@ class RoomEffectView @JvmOverloads constructor(
}
val msgBean = (chatRoomMessage.attachment as RoomRankAttachment).msgBean
val rootView = LayoutInflater.from(mContext).inflate(R.layout.layout_room_rank_notify, null)
(rootView.findViewById<View>(R.id.tv_nick) as TextView).text =
msgBean.title.subAndReplaceDot(6)
(rootView.findViewById<View>(R.id.tv_desc) as TextView).text = msgBean.desc
ImageLoadUtils.loadImage(context, msgBean.avatar, rootView.findViewById(R.id.iv_avatar))
val textView = rootView.findViewById<TextView>(R.id.tv_content)
val text = MessageView.SpannableBuilder(textView)
.append("恭喜", ForegroundColorSpan(Color.WHITE))
.append("${msgBean.title}」房间", Color.parseColor("#FFFC4C"))
.append(msgBean.desc, ForegroundColorSpan(Color.WHITE))
.append("TOP1", ForegroundColorSpan(Color.parseColor("#FFFC4C")))
textView.text = text.build()
rootView.setOnClickListener { AVRoomActivity.start(context, msgBean.uid) }
binding.flSingleRoomRankNotify.addView(rootView)
animationLuckyGift = AnimationUtils.loadAnimation(mContext, R.anim.anim_box_notify)

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

View File

@@ -5,55 +5,28 @@
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"
tools:layout_height="60dp">
<TextView
android:id="@+id/tv_content"
android:layout_width="0dp"
android:maxLines="2"
android:textSize="12dp"
android:textStyle="bold"
android:layout_height="wrap_content"
android:layout_marginStart="65dp"
android:layout_weight="1" />
<ImageView
android:id="@+id/iv_go_room"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:includeFontPadding="false"
android:text="恭喜"
android:textColor="@color/white"
android:textSize="13dp" />
<com.yizhuan.erban.common.widget.CircleImageView
android:id="@+id/iv_avatar"
android:layout_width="22dp"
android:layout_height="22dp"
android:layout_marginStart="3dp"
android:layout_marginEnd="3dp"
android:includeFontPadding="false"
android:src="@drawable/default_avatar" />
<TextView
android:id="@+id/tv_nick"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:includeFontPadding="false"
android:textColor="#FFFFFC4C"
android:textSize="13dp"
tools:text="厅的名字七个字" />
<TextView
android:id="@+id/tv_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:includeFontPadding="false"
android:textColor="@color/white"
android:textSize="13dp"
tools:text=" 成为上时段 小时榜" />
<TextView
android:id="@+id/tv_top"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:includeFontPadding="false"
android:text="TOP1"
android:textColor="#FFFFFC4C"
android:textSize="13dp" />
android:layout_marginStart="5dp"
android:layout_marginEnd="7dp"
android:src="@drawable/room_bg_rank_go_room" />
</LinearLayout>