feat : 我的房間 國家 icon
This commit is contained in:
@@ -19,6 +19,8 @@ import com.chwl.app.ui.widget.magicindicator.ViewPagerHelper
|
||||
import com.chwl.app.ui.widget.magicindicator.buildins.commonnavigator.CommonNavigator
|
||||
import com.chwl.core.home.bean.HomeRoomCardInfo
|
||||
import com.chwl.core.home.bean.MicUsersBean
|
||||
import com.chwl.library.common.util.isVerify
|
||||
import com.chwl.library.common.util.setVis
|
||||
import com.example.lib_utils.ktx.singleClick
|
||||
|
||||
/**
|
||||
@@ -88,6 +90,10 @@ class HomeWithMeFragment : BaseViewBindingFragment<HomeMeFragmentBinding>() {
|
||||
binding.tvRoomTopic.text = roomInfo?.roomDesc
|
||||
binding.ivRoomCover.load(roomInfo?.avatar ?: "")
|
||||
binding.tvOnlineNumber.text = roomInfo?.onlineNum?.toString() ?: "0"
|
||||
if (roomInfo?.regionFlag.isVerify()) {
|
||||
binding.flag.load(roomInfo?.regionFlag)
|
||||
}
|
||||
binding.flag.setVis(roomInfo?.regionFlag.isVerify())
|
||||
loadRoomUsers(roomInfo?.micUsers)
|
||||
}
|
||||
|
||||
|
@@ -70,6 +70,19 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_chainStyle="packed" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/flag"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_room_topic"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_room_topic"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_room_name"
|
||||
android:layout_width="@dimen/dp_22"
|
||||
tools:src="@color/color_313131"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
android:paddingEnd="@dimen/dp_4"
|
||||
android:layout_height="@dimen/dp_14"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_room_topic"
|
||||
android:layout_width="0dp"
|
||||
@@ -84,7 +97,7 @@
|
||||
android:textSize="@dimen/dp_13"
|
||||
app:layout_constraintBottom_toTopOf="@id/layout_room_user_list"
|
||||
app:layout_constraintEnd_toEndOf="@id/tv_room_name"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_room_name"
|
||||
app:layout_constraintStart_toEndOf="@id/flag"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_room_name" />
|
||||
|
||||
<LinearLayout
|
||||
|
@@ -6,6 +6,7 @@ import androidx.annotation.Keep
|
||||
data class HomeRoomCardInfo(
|
||||
val avatar: String?,
|
||||
val roomDesc: String?,
|
||||
val regionFlag: String?,
|
||||
val micUserCount: Long?,
|
||||
val micUsers: List<MicUsersBean>?,
|
||||
val onlineNum: Long?,
|
||||
|
Reference in New Issue
Block a user