fix:调整游戏房间列表样式问题

This commit is contained in:
Max
2023-12-28 10:55:21 +08:00
parent e4cb690b68
commit 32ef74df3a
5 changed files with 6 additions and 7 deletions

View File

@@ -14,8 +14,9 @@ import com.nnbc123.core.home.bean.HomeRoomInfo
class GameRoomAdapter :
BaseQuickAdapter<HomeRoomInfo, BaseViewHolder>(R.layout.game_room_item_room) {
override fun convert(helper: BaseViewHolder, item: HomeRoomInfo) {
helper.getView<ImageView>(R.id.iv_bg).load(item.backgroundPic)
helper.getView<ImageView>(R.id.iv_room_cover).load(item.roomAvatar)
helper.getView<ImageView>(R.id.iv_bg)
.load(item.backgroundPic, defaultRes = R.drawable.game_room_bg_item_default)
helper.getView<ImageView>(R.id.iv_room_cover).load(item.avatar)
helper.setText(R.id.tv_room_name, item.title)
helper.setText(R.id.tv_online_number, "${item.onlineNum}")

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 812 B

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 722 B

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -12,10 +12,10 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:scaleType="centerCrop"
android:src="@drawable/game_room_bg_item_default"
app:layout_constraintDimensionRatio="168:148"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:src="@drawable/default_cover" />
app:layout_constraintTop_toTopOf="parent" />
<com.nnbc123.app.common.widget.RectRoundImageView
android:id="@+id/iv_room_cover"
@@ -114,9 +114,7 @@
android:layout_width="@dimen/dp_18"
android:layout_height="@dimen/dp_18"
android:layout_marginStart="-6dp"
android:src="@drawable/game_room_ic_add"
app:cborder_color="@color/white"
app:cborder_width="1px" />
android:src="@drawable/game_room_ic_add" />
</LinearLayout>