1.纯图片铭牌适配(乱入...) 2.首页派对小游戏tab
This commit is contained in:
@@ -58,7 +58,6 @@ import com.yizhuan.erban.event.OpenRoomIntroEvent
|
|||||||
import com.yizhuan.erban.friend.view.SelectFriendActivity
|
import com.yizhuan.erban.friend.view.SelectFriendActivity
|
||||||
import com.yizhuan.erban.home.adapter.RoomActAdapter
|
import com.yizhuan.erban.home.adapter.RoomActAdapter
|
||||||
import com.yizhuan.erban.home.adapter.RoomActAdapter.RoomActClickListener
|
import com.yizhuan.erban.home.adapter.RoomActAdapter.RoomActClickListener
|
||||||
import com.yizhuan.erban.treasure_box.widget.GoldBoxHelper
|
|
||||||
import com.yizhuan.erban.ui.webview.DialogWebViewActivity
|
import com.yizhuan.erban.ui.webview.DialogWebViewActivity
|
||||||
import com.yizhuan.erban.ui.widget.ButtonItem
|
import com.yizhuan.erban.ui.widget.ButtonItem
|
||||||
import com.yizhuan.erban.ui.widget.GiftDialog
|
import com.yizhuan.erban.ui.widget.GiftDialog
|
||||||
@@ -67,12 +66,10 @@ import com.yizhuan.erban.ui.widget.GiftDialog.SenGiftCallback
|
|||||||
import com.yizhuan.erban.ui.widget.UserInfoDialog
|
import com.yizhuan.erban.ui.widget.UserInfoDialog
|
||||||
import com.yizhuan.erban.ui.widget.dialog.OpenNobleDialog
|
import com.yizhuan.erban.ui.widget.dialog.OpenNobleDialog
|
||||||
import com.yizhuan.erban.ui.widget.dynamicface.DynamicFaceDialog
|
import com.yizhuan.erban.ui.widget.dynamicface.DynamicFaceDialog
|
||||||
import com.yizhuan.erban.ui.widget.magicindicator.buildins.UIUtil
|
|
||||||
import com.yizhuan.erban.ui.widget.rollviewpager.RollPagerView
|
import com.yizhuan.erban.ui.widget.rollviewpager.RollPagerView
|
||||||
import com.yizhuan.erban.ui.widget.rollviewpager.Util
|
import com.yizhuan.erban.ui.widget.rollviewpager.Util
|
||||||
import com.yizhuan.erban.ui.widget.rollviewpager.hintview.ColorPointHintView
|
import com.yizhuan.erban.ui.widget.rollviewpager.hintview.ColorPointHintView
|
||||||
import com.yizhuan.erban.utils.KeyBoardUtils
|
import com.yizhuan.erban.utils.KeyBoardUtils
|
||||||
import com.yizhuan.erban.utils.UserUtils
|
|
||||||
import com.yizhuan.tutu.room_chat.activity.RoomMsgActivity
|
import com.yizhuan.tutu.room_chat.activity.RoomMsgActivity
|
||||||
import com.yizhuan.xchat_android_core.Constants
|
import com.yizhuan.xchat_android_core.Constants
|
||||||
import com.yizhuan.xchat_android_core.UriProvider
|
import com.yizhuan.xchat_android_core.UriProvider
|
||||||
@@ -99,7 +96,6 @@ import com.yizhuan.xchat_android_core.room.bean.RoomInfo
|
|||||||
import com.yizhuan.xchat_android_core.room.event.RoomClearScreenEvent
|
import com.yizhuan.xchat_android_core.room.event.RoomClearScreenEvent
|
||||||
import com.yizhuan.xchat_android_core.room.face.FaceInfo
|
import com.yizhuan.xchat_android_core.room.face.FaceInfo
|
||||||
import com.yizhuan.xchat_android_core.room.giftvalue.helper.GiftValueMrg
|
import com.yizhuan.xchat_android_core.room.giftvalue.helper.GiftValueMrg
|
||||||
import com.yizhuan.xchat_android_core.room.model.AvRoomModel
|
|
||||||
import com.yizhuan.xchat_android_core.room.model.MicQueueModel
|
import com.yizhuan.xchat_android_core.room.model.MicQueueModel
|
||||||
import com.yizhuan.xchat_android_core.room.queue.bean.MicMemberInfo
|
import com.yizhuan.xchat_android_core.room.queue.bean.MicMemberInfo
|
||||||
import com.yizhuan.xchat_android_core.share.bean.SessionType
|
import com.yizhuan.xchat_android_core.share.bean.SessionType
|
||||||
@@ -111,7 +107,6 @@ import com.yizhuan.xchat_android_core.super_admin.util.SuperAdminUtil
|
|||||||
import com.yizhuan.xchat_android_core.user.UserModel
|
import com.yizhuan.xchat_android_core.user.UserModel
|
||||||
import com.yizhuan.xchat_android_core.user.bean.BaseInfo
|
import com.yizhuan.xchat_android_core.user.bean.BaseInfo
|
||||||
import com.yizhuan.xchat_android_core.user.bean.UserInfo
|
import com.yizhuan.xchat_android_core.user.bean.UserInfo
|
||||||
import com.yizhuan.xchat_android_core.utils.LogUtils
|
|
||||||
import com.yizhuan.xchat_android_library.base.factory.CreatePresenter
|
import com.yizhuan.xchat_android_library.base.factory.CreatePresenter
|
||||||
import com.yizhuan.xchat_android_library.net.rxnet.utils.RxNetWorkUtils
|
import com.yizhuan.xchat_android_library.net.rxnet.utils.RxNetWorkUtils
|
||||||
import com.yizhuan.xchat_android_library.rxbus.RxBus
|
import com.yizhuan.xchat_android_library.rxbus.RxBus
|
||||||
@@ -120,7 +115,6 @@ import com.yizhuan.xchat_android_library.utils.config.BasicConfig
|
|||||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||||
import io.reactivex.disposables.Disposable
|
import io.reactivex.disposables.Disposable
|
||||||
import io.reactivex.functions.BiConsumer
|
import io.reactivex.functions.BiConsumer
|
||||||
import io.reactivex.functions.Consumer
|
|
||||||
import org.greenrobot.eventbus.EventBus
|
import org.greenrobot.eventbus.EventBus
|
||||||
import org.greenrobot.eventbus.Subscribe
|
import org.greenrobot.eventbus.Subscribe
|
||||||
import org.greenrobot.eventbus.ThreadMode
|
import org.greenrobot.eventbus.ThreadMode
|
||||||
|
@@ -674,19 +674,6 @@ class GameDelegate(val activity: Activity, val container: FrameLayout, var mgId:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun isPlaying(): Boolean {
|
|
||||||
val dataJson = iSudFSTAPP?.getGameState(SudMGPMGState.MG_COMMON_PLAYER_PLAYING)
|
|
||||||
LogUtils.d(dataJson)
|
|
||||||
try {
|
|
||||||
val jsonObject = JSONObject(dataJson)
|
|
||||||
return jsonObject.getBoolean("isPlaying")
|
|
||||||
} catch (e: Exception) {
|
|
||||||
e.printStackTrace()
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
fun onStart() {
|
fun onStart() {
|
||||||
iSudFSTAPP?.startMG() //启动游戏
|
iSudFSTAPP?.startMG() //启动游戏
|
||||||
}
|
}
|
||||||
|
@@ -19,6 +19,9 @@ class HomeViewModel : BaseViewModel() {
|
|||||||
private val _hotRoomLiveData = MutableLiveData<ListResult<HomeRoomInfo>>()
|
private val _hotRoomLiveData = MutableLiveData<ListResult<HomeRoomInfo>>()
|
||||||
val hotRoomLiveData: LiveData<ListResult<HomeRoomInfo>> = _hotRoomLiveData
|
val hotRoomLiveData: LiveData<ListResult<HomeRoomInfo>> = _hotRoomLiveData
|
||||||
|
|
||||||
|
private val _gameRoomLiveData = MutableLiveData<ListResult<HomeRoomInfo>>()
|
||||||
|
val gameRoomLiveData: LiveData<ListResult<HomeRoomInfo>> = _gameRoomLiveData
|
||||||
|
|
||||||
private val _concernsLiveData = MutableLiveData<List<HomeConcernsInfo>>()
|
private val _concernsLiveData = MutableLiveData<List<HomeConcernsInfo>>()
|
||||||
val concernsLiveData: LiveData<List<HomeConcernsInfo>> = _concernsLiveData
|
val concernsLiveData: LiveData<List<HomeConcernsInfo>> = _concernsLiveData
|
||||||
|
|
||||||
@@ -98,6 +101,17 @@ class HomeViewModel : BaseViewModel() {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun getGameRoom(pageNum: Int, pageSize: Int) {
|
||||||
|
safeLaunch(
|
||||||
|
onError = {
|
||||||
|
_gameRoomLiveData.value = ListResult.failed(pageNum)
|
||||||
|
},
|
||||||
|
block = {
|
||||||
|
val result = HomeModel.getGameRoom(pageNum, pageSize)
|
||||||
|
_gameRoomLiveData.value = ListResult.success(result, pageNum)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
fun getCollectRoom(pageNum: Int, pageSize: Int) {
|
fun getCollectRoom(pageNum: Int, pageSize: Int) {
|
||||||
safeLaunch(
|
safeLaunch(
|
||||||
@@ -113,11 +127,21 @@ class HomeViewModel : BaseViewModel() {
|
|||||||
val collectRooms = async(Dispatchers.IO) {
|
val collectRooms = async(Dispatchers.IO) {
|
||||||
HomeModel.getCollectRoom(pageNum, pageSize)
|
HomeModel.getCollectRoom(pageNum, pageSize)
|
||||||
}
|
}
|
||||||
_concernsLiveData.value = concernsRooms.await()
|
try {
|
||||||
_collectLiveData.value =
|
_concernsLiveData.value = concernsRooms.await()
|
||||||
ListResult.success(collectRooms.await()?.fansRoomList, pageNum)
|
} catch (e: Exception) {
|
||||||
_emptyLiveData.value = concernsRooms.await().isNullOrEmpty() &&
|
_concernsLiveData.value = null
|
||||||
collectRooms.await()?.fansRoomList.isNullOrEmpty()
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
_collectLiveData.value =
|
||||||
|
ListResult.success(collectRooms.await()?.fansRoomList, pageNum)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
_collectLiveData.value = ListResult.failed(pageNum)
|
||||||
|
}
|
||||||
|
|
||||||
|
_emptyLiveData.value = _concernsLiveData.value.isNullOrEmpty() &&
|
||||||
|
_collectLiveData.value?.data.isNullOrEmpty()
|
||||||
} else {
|
} else {
|
||||||
val result = HomeModel.getCollectRoom(pageNum, pageSize)
|
val result = HomeModel.getCollectRoom(pageNum, pageSize)
|
||||||
_collectLiveData.value = ListResult.success(result?.fansRoomList, pageNum)
|
_collectLiveData.value = ListResult.success(result?.fansRoomList, pageNum)
|
||||||
|
@@ -1,14 +1,17 @@
|
|||||||
package com.yizhuan.erban.home.adapter
|
package com.yizhuan.erban.home.adapter
|
||||||
|
|
||||||
|
import android.graphics.Color
|
||||||
|
import android.graphics.LinearGradient
|
||||||
|
import android.graphics.Shader
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
|
import android.widget.TextView
|
||||||
|
import androidx.core.view.isGone
|
||||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||||
import com.chad.library.adapter.base.BaseViewHolder
|
import com.chad.library.adapter.base.BaseViewHolder
|
||||||
import com.yizhuan.erban.R
|
import com.yizhuan.erban.R
|
||||||
import com.yizhuan.erban.avroom.activity.AVRoomActivity
|
import com.yizhuan.erban.avroom.activity.AVRoomActivity
|
||||||
import com.yizhuan.erban.ui.utils.ImageLoadUtilsV2
|
|
||||||
import com.yizhuan.erban.ui.utils.load
|
import com.yizhuan.erban.ui.utils.load
|
||||||
import com.yizhuan.xchat_android_core.home.bean.HomeRoomInfo
|
import com.yizhuan.xchat_android_core.home.bean.HomeRoomInfo
|
||||||
import com.yizhuan.xchat_android_core.utils.TextUtils
|
|
||||||
|
|
||||||
|
|
||||||
class RoomGameAdapter : BaseQuickAdapter<HomeRoomInfo, BaseViewHolder>(R.layout.item_room_game) {
|
class RoomGameAdapter : BaseQuickAdapter<HomeRoomInfo, BaseViewHolder>(R.layout.item_room_game) {
|
||||||
@@ -17,15 +20,41 @@ class RoomGameAdapter : BaseQuickAdapter<HomeRoomInfo, BaseViewHolder>(R.layout.
|
|||||||
override fun convert(helper: BaseViewHolder, item: HomeRoomInfo) {
|
override fun convert(helper: BaseViewHolder, item: HomeRoomInfo) {
|
||||||
helper.apply {
|
helper.apply {
|
||||||
getView<ImageView>(R.id.iv_room_image).load(item.avatar)
|
getView<ImageView>(R.id.iv_room_image).load(item.avatar)
|
||||||
setText(R.id.tv_online_number, "${item.onlineNum}人热聊中")
|
|
||||||
setText(R.id.tv_room_title, item.title)
|
setText(R.id.tv_room_title, item.title)
|
||||||
itemView.setOnClickListener {
|
itemView.setOnClickListener {
|
||||||
AVRoomActivity.start(mContext, item.uid)
|
AVRoomActivity.start(mContext, item.uid)
|
||||||
}
|
}
|
||||||
|
val tvRoomGame = helper.getView<TextView>(R.id.tv_room_game)
|
||||||
|
tvRoomGame.text = item.mgName
|
||||||
|
helper.setText(R.id.tv_game_status, if (item.state == 1) "游戏中" else "等人中")
|
||||||
|
setGradient(tvRoomGame)
|
||||||
}
|
}
|
||||||
|
|
||||||
helper.setVisible(R.id.iv_room_tag, !TextUtils.isEmptyText(item.tagPict))
|
val avatars: Array<ImageView> = arrayOf(
|
||||||
ImageLoadUtilsV2.loadImage(helper.getView(R.id.iv_room_tag), item.tagPict)
|
helper.getView(R.id.iv_avatar_0),
|
||||||
|
helper.getView(R.id.iv_avatar_1),
|
||||||
|
helper.getView(R.id.iv_avatar_2),
|
||||||
|
helper.getView(R.id.iv_avatar_3),
|
||||||
|
helper.getView(R.id.iv_avatar_4)
|
||||||
|
)
|
||||||
|
for (i in avatars.indices) {
|
||||||
|
val avatarUrl = item.micUsers?.getOrNull(i)?.avatar
|
||||||
|
avatars[i].isGone = avatarUrl.isNullOrBlank()
|
||||||
|
avatars[i].load(avatarUrl)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setGradient(textView: TextView) {
|
||||||
|
val endX = textView.paint.textSize * textView.text.length
|
||||||
|
val linearGradient = LinearGradient(
|
||||||
|
0f, 0f, endX, 0f,
|
||||||
|
Color.parseColor("#FF61C4FE"),
|
||||||
|
Color.parseColor("#FFA979FF"),
|
||||||
|
Shader.TileMode.CLAMP
|
||||||
|
)
|
||||||
|
textView.paint.shader = linearGradient
|
||||||
|
textView.invalidate()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@@ -11,7 +11,6 @@ import com.yizhuan.erban.home.adapter.RoomGameAdapter
|
|||||||
import com.yizhuan.erban.ui.utils.RVDelegate
|
import com.yizhuan.erban.ui.utils.RVDelegate
|
||||||
import com.yizhuan.xchat_android_core.home.bean.HomeRoomInfo
|
import com.yizhuan.xchat_android_core.home.bean.HomeRoomInfo
|
||||||
|
|
||||||
|
|
||||||
class RoomGameFragment : BaseViewBindingFragment<FragmentRoomGameBinding>() {
|
class RoomGameFragment : BaseViewBindingFragment<FragmentRoomGameBinding>() {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
@@ -35,22 +34,38 @@ class RoomGameFragment : BaseViewBindingFragment<FragmentRoomGameBinding>() {
|
|||||||
.setRecyclerView(binding.recyclerView)
|
.setRecyclerView(binding.recyclerView)
|
||||||
.setEmptyView(EmptyViewHelper.createEmptyView(context, "暂无房间"))
|
.setEmptyView(EmptyViewHelper.createEmptyView(context, "暂无房间"))
|
||||||
.setLayoutManager(LinearLayoutManager(mContext))
|
.setLayoutManager(LinearLayoutManager(mContext))
|
||||||
|
.setRefreshLayout(binding.refreshLayout)
|
||||||
.setPageSize(pageSize)
|
.setPageSize(pageSize)
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
roomHotAdapter.setOnLoadMoreListener({ loadData(false) }, binding.recyclerView)
|
roomHotAdapter.setOnLoadMoreListener({ loadData(false) }, binding.recyclerView)
|
||||||
|
|
||||||
homeViewModel.hotRoomLiveData.observe(this) {
|
binding.refreshLayout.setOnRefreshListener {
|
||||||
|
loadData(true)
|
||||||
|
}
|
||||||
|
homeViewModel.gameRoomLiveData.observe(this) {
|
||||||
rvDelegate.loadData(it)
|
rvDelegate.loadData(it)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
binding.tvMatch.setOnClickListener {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onResume() {
|
||||||
|
super.onResume()
|
||||||
loadData(true)
|
loadData(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun loadData(isRefresh: Boolean) {
|
private fun loadData(isRefresh: Boolean) {
|
||||||
|
|
||||||
|
binding.refreshLayout.isRefreshing = isRefresh
|
||||||
|
|
||||||
if (isRefresh) {
|
if (isRefresh) {
|
||||||
page = 1
|
page = 1
|
||||||
} else {
|
} else {
|
||||||
page++
|
page++
|
||||||
}
|
}
|
||||||
homeViewModel.getHotRoom(page, pageSize)
|
homeViewModel.getGameRoom(page, pageSize)
|
||||||
}
|
}
|
||||||
}
|
}
|
Binary file not shown.
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.9 KiB |
BIN
app/src/main/res/drawable-xhdpi/bg_home_game_item.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/bg_home_game_item.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_home_game_go_room.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ic_home_game_go_room.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.2 KiB |
@@ -113,7 +113,7 @@
|
|||||||
tools:src="@drawable/ic_user_charm_level" />
|
tools:src="@drawable/ic_user_charm_level" />
|
||||||
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/in_official_mask"
|
android:id="@+id/in_official_mask"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
@@ -122,11 +122,10 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_official_mask"
|
android:id="@+id/iv_official_mask"
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="0dp"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:src="@drawable/ic_temp_official_mask" />
|
tools:src="@drawable/ic_temp_official_mask" />
|
||||||
|
@@ -129,11 +129,10 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_official_mask"
|
android:id="@+id/iv_official_mask"
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="0dp"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:layout_height="match_parent"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:src="@drawable/ic_temp_official_mask" />
|
tools:src="@drawable/ic_temp_official_mask" />
|
||||||
|
@@ -1,9 +1,43 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@+id/recycler_view"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:id="@+id/refresh_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent">
|
||||||
android:clipToPadding="false"
|
|
||||||
android:paddingStart="8dp"
|
|
||||||
android:paddingEnd="8dp" />
|
<FrameLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/recycler_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:clipToPadding="false"
|
||||||
|
android:paddingStart="8dp"
|
||||||
|
android:paddingEnd="8dp" />
|
||||||
|
|
||||||
|
<com.coorchice.library.SuperTextView
|
||||||
|
android:id="@+id/tv_match"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_gravity="bottom|end"
|
||||||
|
android:layout_marginEnd="24dp"
|
||||||
|
android:layout_marginBottom="35dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:paddingStart="9dp"
|
||||||
|
android:paddingEnd="16dp"
|
||||||
|
android:text="快速匹配"
|
||||||
|
android:textColor="#ffffffff"
|
||||||
|
android:textSize="16sp"
|
||||||
|
app:corner="20dp"
|
||||||
|
app:shaderEnable="true"
|
||||||
|
app:shaderEndColor="#FFA936"
|
||||||
|
app:shaderMode="leftToRight"
|
||||||
|
app:shaderStartColor="#FFCB47" />
|
||||||
|
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||||
|
|
||||||
|
@@ -72,11 +72,10 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_official_mask"
|
android:id="@+id/iv_official_mask"
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="0dp"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:layout_height="match_parent"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:src="@drawable/ic_temp_official_mask" />
|
tools:src="@drawable/ic_temp_official_mask" />
|
||||||
|
@@ -67,15 +67,13 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_official_mask"
|
android:id="@+id/iv_official_mask"
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="0dp"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:layout_height="match_parent"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:src="@drawable/ic_temp_official_mask" />
|
tools:src="@drawable/ic_temp_official_mask" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_official_mask"
|
android:id="@+id/tv_official_mask"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@@ -5,15 +5,14 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="12dp"
|
android:layout_marginStart="12dp"
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:layout_marginEnd="10dp">
|
android:layout_marginEnd="10dp">
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/view_bg"
|
android:id="@+id/view_bg"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="74dp"
|
android:layout_height="96dp"
|
||||||
android:layout_marginTop="7dp"
|
android:layout_marginStart="30dp"
|
||||||
android:background="@drawable/bg_home_common_item"
|
android:background="@drawable/bg_home_game_item"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
@@ -23,6 +22,7 @@
|
|||||||
android:layout_width="74dp"
|
android:layout_width="74dp"
|
||||||
android:layout_height="74dp"
|
android:layout_height="74dp"
|
||||||
android:layout_marginStart="3dp"
|
android:layout_marginStart="3dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
android:src="@drawable/default_cover"
|
android:src="@drawable/default_cover"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
@@ -60,108 +60,122 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="10dp"
|
android:layout_marginStart="10dp"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
|
android:includeFontPadding="false"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:textColor="@color/text_primary"
|
android:textColor="@color/text_primary"
|
||||||
android:textSize="14sp"
|
android:textSize="14dp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintBottom_toTopOf="@id/iv_room_tag"
|
app:layout_constraintBottom_toTopOf="@id/tv_room_game"
|
||||||
app:layout_constraintStart_toEndOf="@id/view_room_cover"
|
app:layout_constraintStart_toEndOf="@id/view_room_cover"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintVertical_chainStyle="packed"
|
app:layout_constraintVertical_chainStyle="packed"
|
||||||
tools:text="余生点唱歌曲交友房间" />
|
tools:text="余生点唱歌曲交友房间" />
|
||||||
|
|
||||||
<ImageView
|
<TextView
|
||||||
android:id="@+id/iv_room_tag"
|
android:id="@+id/tv_room_game"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="14dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="11dp"
|
android:layout_marginTop="4dp"
|
||||||
android:adjustViewBounds="true"
|
android:includeFontPadding="false"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
android:textSize="10dp"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/fl_avatar"
|
||||||
app:layout_constraintStart_toStartOf="@id/tv_room_title"
|
app:layout_constraintStart_toStartOf="@id/tv_room_title"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tv_room_title"
|
app:layout_constraintTop_toBottomOf="@id/tv_room_title"
|
||||||
tools:src="@drawable/tag_101"
|
tools:text="你画我猜" />
|
||||||
tools:text="聊天" />
|
|
||||||
|
<View
|
||||||
|
android:id="@+id/view_line"
|
||||||
|
android:layout_width="1px"
|
||||||
|
android:layout_height="9dp"
|
||||||
|
android:layout_marginStart="4dp"
|
||||||
|
android:background="#FFD8D8D8"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/tv_room_game"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/tv_room_game"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/tv_room_game" />
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_id"
|
android:id="@+id/tv_game_status"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="6dp"
|
android:layout_marginStart="4dp"
|
||||||
android:textColor="#66333333"
|
|
||||||
android:textSize="12sp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/iv_room_tag"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/iv_room_tag"
|
|
||||||
tools:text="ID:1234" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_online_number"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="14dp"
|
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:drawableStart="@drawable/ic_home_hot_hot"
|
|
||||||
android:drawablePadding="2dp"
|
|
||||||
android:gravity="bottom"
|
|
||||||
android:includeFontPadding="false"
|
android:includeFontPadding="false"
|
||||||
android:textColor="@color/color_333333"
|
android:textColor="@color/color_999999"
|
||||||
android:textSize="12sp"
|
android:textSize="10sp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintBottom_toBottomOf="@id/tv_room_game"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintStart_toEndOf="@id/view_line"
|
||||||
tools:text="266" />
|
app:layout_constraintTop_toTopOf="@id/tv_room_game"
|
||||||
|
tools:text="游戏中" />
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/fl_avatar"
|
android:id="@+id/fl_avatar"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
android:layout_marginEnd="18dp"
|
android:layout_marginEnd="18dp"
|
||||||
android:layout_marginBottom="20dp"
|
android:layout_marginBottom="4dp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent">
|
app:layout_constraintStart_toStartOf="@id/tv_room_title"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_room_game">
|
||||||
|
|
||||||
<com.yizhuan.erban.common.widget.CircleImageView
|
<com.yizhuan.erban.common.widget.CircleImageView
|
||||||
android:id="@+id/iv_avatar_0"
|
android:id="@+id/iv_avatar_0"
|
||||||
android:layout_width="16dp"
|
android:layout_width="32dp"
|
||||||
android:layout_height="16dp"
|
android:layout_height="32dp"
|
||||||
android:src="@drawable/default_avatar"
|
android:src="@drawable/default_avatar"
|
||||||
app:cborder_color="@color/white"
|
app:cborder_color="@color/white"
|
||||||
app:cborder_width="1px" />
|
app:cborder_width="2dp" />
|
||||||
|
|
||||||
<com.yizhuan.erban.common.widget.CircleImageView
|
<com.yizhuan.erban.common.widget.CircleImageView
|
||||||
android:id="@+id/iv_avatar_1"
|
android:id="@+id/iv_avatar_1"
|
||||||
android:layout_width="16dp"
|
android:layout_width="32dp"
|
||||||
android:layout_height="16dp"
|
android:layout_height="32dp"
|
||||||
android:layout_marginStart="14dp"
|
|
||||||
android:src="@drawable/default_avatar"
|
|
||||||
app:cborder_color="@color/white"
|
|
||||||
app:cborder_width="1px" />
|
|
||||||
|
|
||||||
<com.yizhuan.erban.common.widget.CircleImageView
|
|
||||||
android:id="@+id/iv_avatar_2"
|
|
||||||
android:layout_width="16dp"
|
|
||||||
android:layout_height="16dp"
|
|
||||||
android:layout_marginStart="28dp"
|
android:layout_marginStart="28dp"
|
||||||
android:src="@drawable/default_avatar"
|
android:src="@drawable/default_avatar"
|
||||||
app:cborder_color="@color/white"
|
app:cborder_color="@color/white"
|
||||||
app:cborder_width="1px" />
|
app:cborder_width="2dp" />
|
||||||
|
|
||||||
|
<com.yizhuan.erban.common.widget.CircleImageView
|
||||||
|
android:id="@+id/iv_avatar_2"
|
||||||
|
android:layout_width="32dp"
|
||||||
|
android:layout_height="32dp"
|
||||||
|
android:layout_marginStart="56dp"
|
||||||
|
android:src="@drawable/default_avatar"
|
||||||
|
app:cborder_color="@color/white"
|
||||||
|
app:cborder_width="2dp" />
|
||||||
|
|
||||||
<com.yizhuan.erban.common.widget.CircleImageView
|
<com.yizhuan.erban.common.widget.CircleImageView
|
||||||
android:id="@+id/iv_avatar_3"
|
android:id="@+id/iv_avatar_3"
|
||||||
android:layout_width="16dp"
|
android:layout_width="32dp"
|
||||||
android:layout_height="16dp"
|
android:layout_height="32dp"
|
||||||
android:layout_marginStart="44dp"
|
android:layout_marginStart="84dp"
|
||||||
android:src="@drawable/default_avatar"
|
android:src="@drawable/default_avatar"
|
||||||
app:cborder_color="@color/white"
|
app:cborder_color="@color/white"
|
||||||
app:cborder_width="1px" />
|
app:cborder_width="2dp" />
|
||||||
|
|
||||||
<com.yizhuan.erban.common.widget.CircleImageView
|
<com.yizhuan.erban.common.widget.CircleImageView
|
||||||
android:id="@+id/iv_avatar_4"
|
android:id="@+id/iv_avatar_4"
|
||||||
android:layout_width="16dp"
|
android:layout_width="32dp"
|
||||||
android:layout_height="16dp"
|
android:layout_height="32dp"
|
||||||
android:layout_marginStart="58dp"
|
android:layout_marginStart="112dp"
|
||||||
android:src="@drawable/default_avatar"
|
android:src="@drawable/default_avatar"
|
||||||
app:cborder_color="@color/white"
|
app:cborder_color="@color/white"
|
||||||
app:cborder_width="1px" />
|
app:cborder_width="2dp" />
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/tv_go_room"
|
||||||
|
android:layout_width="68dp"
|
||||||
|
android:layout_height="38dp"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:layout_marginBottom="15dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:src="@drawable/ic_home_game_go_room"
|
||||||
|
android:text="进房"
|
||||||
|
android:textColor="#ffffffff"
|
||||||
|
android:textSize="12sp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -56,15 +56,13 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_official_mask"
|
android:id="@+id/iv_official_mask"
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="0dp"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:layout_height="match_parent"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:src="@drawable/ic_temp_official_mask" />
|
tools:src="@drawable/ic_temp_official_mask" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_official_mask"
|
android:id="@+id/tv_official_mask"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@@ -10,15 +10,13 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_official_mask"
|
android:id="@+id/iv_official_mask"
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="0dp"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:src="@drawable/ic_temp_official_mask" />
|
tools:src="@drawable/ic_temp_official_mask" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_official_mask"
|
android:id="@+id/tv_official_mask"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@@ -94,9 +94,9 @@
|
|||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_official_mask"
|
android:id="@+id/iv_official_mask"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="0dp"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:src="@drawable/ic_temp_official_mask" />
|
tools:src="@drawable/ic_temp_official_mask" />
|
||||||
|
@@ -103,11 +103,10 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_official_mask"
|
android:id="@+id/iv_official_mask"
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="0dp"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:layout_height="match_parent"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:src="@drawable/ic_temp_official_mask" />
|
tools:src="@drawable/ic_temp_official_mask" />
|
||||||
|
@@ -67,11 +67,10 @@
|
|||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_official_mask"
|
android:id="@+id/iv_official_mask"
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="0dp"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:layout_height="match_parent"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:src="@drawable/ic_temp_official_mask" />
|
tools:src="@drawable/ic_temp_official_mask" />
|
||||||
|
@@ -30,6 +30,9 @@ public class HomeRoomInfo implements MultiItemEntity {
|
|||||||
private boolean crossPking;
|
private boolean crossPking;
|
||||||
private boolean valid;
|
private boolean valid;
|
||||||
private boolean isBanner;
|
private boolean isBanner;
|
||||||
|
private long mgId;
|
||||||
|
private String mgName;
|
||||||
|
public int state;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getItemType() {
|
public int getItemType() {
|
||||||
|
@@ -129,6 +129,12 @@ object HomeModel : BaseModel() {
|
|||||||
api.getCommonRoom(tabId, pageNum, pageSize)
|
api.getCommonRoom(tabId, pageNum, pageSize)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
suspend fun getGameRoom(pageNum: Int, pageSize: Int): List<HomeRoomInfo>? =
|
||||||
|
launchRequest {
|
||||||
|
api.getGameRoom(pageNum, pageSize)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
suspend fun getHomeTag(): List<HomeTagInfo>? =
|
suspend fun getHomeTag(): List<HomeTagInfo>? =
|
||||||
launchRequest {
|
launchRequest {
|
||||||
@@ -251,6 +257,17 @@ object HomeModel : BaseModel() {
|
|||||||
@Query("pageSize") pageSize: Int
|
@Query("pageSize") pageSize: Int
|
||||||
): ServiceResult<List<HomeRoomInfo>>
|
): ServiceResult<List<HomeRoomInfo>>
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 首页游戏房间
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GET("home/miniGameTabList")
|
||||||
|
suspend fun getGameRoom(
|
||||||
|
@Query("pageNum") pageNum: Int,
|
||||||
|
@Query("pageSize") pageSize: Int
|
||||||
|
): ServiceResult<List<HomeRoomInfo>>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 首页派对 Tag List
|
* 首页派对 Tag List
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user