首頁ui修改,修復測試提的bug
@@ -69,6 +69,12 @@ class HomeViewModel : BaseViewModel() {
|
||||
private val _anchorInfoLiveData = MutableLiveData<AnchorInfo?>()
|
||||
val anchorInfoLiveData: MutableLiveData<AnchorInfo?> = _anchorInfoLiveData
|
||||
|
||||
private val _homePlayInfoLiveData = MutableLiveData<List<HomeRoomInfo>?>()
|
||||
val homePlayInfoData : MutableLiveData<List<HomeRoomInfo>?> = _homePlayInfoLiveData
|
||||
|
||||
private val _homeHotRoomLiveData = MutableLiveData<List<HomeRoomInfo>?>()
|
||||
val homeHotRoomLiveData: LiveData<List<HomeRoomInfo>?> = _homeHotRoomLiveData
|
||||
|
||||
fun getBannerInfo() {
|
||||
safeLaunch {
|
||||
_bannerLiveData.value = HomeModel.getHomeBanner("9")
|
||||
@@ -239,5 +245,26 @@ class HomeViewModel : BaseViewModel() {
|
||||
)
|
||||
}
|
||||
|
||||
fun getHomePlayV2() {
|
||||
safeLaunch(
|
||||
onError = {
|
||||
_homePlayInfoLiveData.value = null
|
||||
},
|
||||
block = {
|
||||
_homePlayInfoLiveData.value = HomeModel.getHomePlayV2()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
fun getHotRoom() {
|
||||
safeLaunch(
|
||||
onError = {
|
||||
_homeHotRoomLiveData.value = null
|
||||
},
|
||||
block = {
|
||||
_homeHotRoomLiveData.value = HomeModel.getHotRoom()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,31 @@
|
||||
package com.yizhuan.erban.home.adapter
|
||||
|
||||
import android.view.View
|
||||
import androidx.core.content.ContextCompat
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.ui.utils.ImageLoadUtilsV2
|
||||
import com.yizhuan.xchat_android_core.home.bean.HomeRoomInfo
|
||||
|
||||
/**
|
||||
* create by lvzebiao @2019/11/13
|
||||
*/
|
||||
class HomeChatAdapter :
|
||||
BaseQuickAdapter<HomeRoomInfo, BaseViewHolder>(R.layout.item_home_chat) {
|
||||
|
||||
override fun convert(helper: BaseViewHolder, item: HomeRoomInfo) {
|
||||
when(item.gender){
|
||||
0 ->{
|
||||
helper.getView<View>(R.id.mViewBg).background = ContextCompat.getDrawable(mContext,R.drawable.bg_home_chat_man)
|
||||
}
|
||||
1 ->{
|
||||
helper.getView<View>(R.id.mViewBg).background = ContextCompat.getDrawable(mContext,R.drawable.bg_home_chat_man)
|
||||
}
|
||||
2 ->{
|
||||
helper.getView<View>(R.id.mViewBg).background = ContextCompat.getDrawable(mContext,R.drawable.bg_home_chat_women)
|
||||
}
|
||||
}
|
||||
ImageLoadUtilsV2.loadAvatar(helper.getView(R.id.mCirImage), item.avatar)
|
||||
}
|
||||
}
|
@@ -0,0 +1,43 @@
|
||||
package com.yizhuan.erban.home.adapter
|
||||
|
||||
import android.widget.ImageView
|
||||
import androidx.core.view.isGone
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.chad.library.adapter.base.BaseViewHolder
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.ui.utils.ImageLoadUtilsV2
|
||||
import com.yizhuan.erban.ui.utils.load
|
||||
import com.yizhuan.xchat_android_core.home.bean.HomeRoomInfo
|
||||
import com.yizhuan.xchat_android_core.utils.TextUtils
|
||||
|
||||
/**
|
||||
* create by lvzebiao @2019/11/13
|
||||
*/
|
||||
class HomeHotAdapter :
|
||||
BaseQuickAdapter<HomeRoomInfo, BaseViewHolder>(R.layout.item_room_common) {
|
||||
|
||||
override fun convert(helper: BaseViewHolder, item: HomeRoomInfo) {
|
||||
helper.apply {
|
||||
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_id, "ID:${item.erbanNo}")
|
||||
}
|
||||
helper.setVisible(R.id.tv_in_pk, item.isCrossPking)
|
||||
helper.setGone(R.id.iv_room_tag, !TextUtils.isEmptyText(item.tagPict))
|
||||
ImageLoadUtilsV2.loadImage(helper.getView(R.id.iv_room_tag), item.tagPict)
|
||||
|
||||
val avatars: Array<ImageView> = arrayOf(
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
@@ -22,7 +22,7 @@ class RoomCommonAdapter : BaseQuickAdapter<HomeRoomInfo, BaseViewHolder>(R.layou
|
||||
setText(R.id.tv_id, "ID:${item.erbanNo}")
|
||||
}
|
||||
helper.setVisible(R.id.tv_in_pk, item.isCrossPking)
|
||||
helper.setVisible(R.id.iv_room_tag, !TextUtils.isEmptyText(item.tagPict))
|
||||
helper.setGone(R.id.iv_room_tag, !TextUtils.isEmptyText(item.tagPict))
|
||||
ImageLoadUtilsV2.loadImage(helper.getView(R.id.iv_room_tag), item.tagPict)
|
||||
|
||||
val avatars: Array<ImageView> = arrayOf(
|
||||
|
@@ -1,33 +1,24 @@
|
||||
package com.yizhuan.erban.home.fragment
|
||||
|
||||
import android.graphics.Color
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.TextView
|
||||
import androidx.core.view.isGone
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.scwang.smartrefresh.layout.internal.ProgressDrawable
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.avroom.activity.AVRoomActivity
|
||||
import com.yizhuan.erban.avroom.adapter.RoomVPAdapter
|
||||
import com.yizhuan.erban.base.BaseActivity
|
||||
import com.yizhuan.erban.base.BaseFragment
|
||||
import com.yizhuan.erban.databinding.FragmentRecommendBinding
|
||||
import com.yizhuan.erban.home.HomeViewModel
|
||||
import com.yizhuan.erban.home.adapter.HomeSingleAnchorAdapter
|
||||
import com.yizhuan.erban.home.adapter.MainMagicIndicatorAdapter
|
||||
import com.yizhuan.erban.home.adapter.HomeChatAdapter
|
||||
import com.yizhuan.erban.home.adapter.HomeHotAdapter
|
||||
import com.yizhuan.erban.home.dialog.RecommendRoomDialog
|
||||
import com.yizhuan.erban.home.helper.BannerHelper
|
||||
import com.yizhuan.erban.ui.utils.load
|
||||
import com.yizhuan.erban.ui.webview.CommonWebViewActivity
|
||||
import com.yizhuan.erban.ui.widget.magicindicator.ViewPagerHelper
|
||||
import com.yizhuan.erban.ui.widget.magicindicator.buildins.commonnavigator.CommonNavigator
|
||||
import com.yizhuan.erban.home.helper.OpenRoomHelper
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel
|
||||
import com.yizhuan.xchat_android_core.home.bean.HomeRoomInfo
|
||||
import com.yizhuan.xchat_android_core.home.event.RefreshHomeDataEvent
|
||||
import com.yizhuan.xchat_android_core.initial.InitialModel
|
||||
import com.yizhuan.xchat_android_core.statistic.StatisticManager
|
||||
import com.yizhuan.xchat_android_core.statistic.protocol.StatisticsProtocol
|
||||
import com.yizhuan.xchat_android_library.utils.ResUtil
|
||||
@@ -38,11 +29,10 @@ import org.greenrobot.eventbus.ThreadMode
|
||||
/**
|
||||
* Peko首页
|
||||
*/
|
||||
class RecommendFragment : BaseFragment(),
|
||||
MainMagicIndicatorAdapter.OnItemSelectListener {
|
||||
class RecommendFragment : BaseFragment() {
|
||||
private lateinit var mBinding: FragmentRecommendBinding
|
||||
private var mFragmentsBottom: MutableList<Fragment> = ArrayList()
|
||||
private lateinit var singleAnchorAdapter: HomeSingleAnchorAdapter
|
||||
private lateinit var charAdapter: HomeChatAdapter
|
||||
private lateinit var roomHotAdapter: HomeHotAdapter
|
||||
|
||||
private val homeViewModel: HomeViewModel by activityViewModels()
|
||||
|
||||
@@ -63,7 +53,6 @@ class RecommendFragment : BaseFragment(),
|
||||
return R.layout.fragment_recommend
|
||||
}
|
||||
|
||||
|
||||
override fun onFindViews() {
|
||||
mBinding = DataBindingUtil.bind(mView)!!
|
||||
}
|
||||
@@ -75,8 +64,8 @@ class RecommendFragment : BaseFragment(),
|
||||
|
||||
override fun initiate() {
|
||||
initRefreshView()
|
||||
initTitleTab()
|
||||
initSingleAnchor()
|
||||
initChatTab()
|
||||
initHotRoomTab()
|
||||
|
||||
childFragmentManager
|
||||
.beginTransaction()
|
||||
@@ -86,38 +75,10 @@ class RecommendFragment : BaseFragment(),
|
||||
homeViewModel.bannerLiveData.observe(this) {
|
||||
BannerHelper.setBanner(mBinding.rollView, it) { _, _ ->
|
||||
StatisticManager.Instance()
|
||||
.onEvent(StatisticsProtocol.EVENT_HOME_BANNER_CLICK, ResUtil.getString(R.string.home_fragment_recommendfragment_01))
|
||||
}
|
||||
}
|
||||
|
||||
homeViewModel.resourceLiveData.observe(this) {
|
||||
if (it.isNullOrEmpty() || it.size != 3) {
|
||||
mBinding.llResource.isGone = true
|
||||
return@observe
|
||||
}
|
||||
mBinding.llResource.isGone = false
|
||||
val resourceViews = arrayOf(
|
||||
mBinding.ivResource0,
|
||||
mBinding.ivResource1,
|
||||
mBinding.ivResource2
|
||||
)
|
||||
|
||||
for (i in resourceViews.indices) {
|
||||
resourceViews[i].load(it[i].icon)
|
||||
resourceViews[i].setOnClickListener { _ ->
|
||||
currMatchClick = abcArray[i]
|
||||
StatisticManager.Instance().onEvent(
|
||||
"${currMatchClick}_match_click",
|
||||
ResUtil.getString(R.string.home_fragment_recommendfragment_02),
|
||||
mapOf("user_id" to AuthModel.get().currentUid.toString())
|
||||
.onEvent(
|
||||
StatisticsProtocol.EVENT_HOME_BANNER_CLICK,
|
||||
ResUtil.getString(R.string.home_fragment_recommendfragment_01)
|
||||
)
|
||||
if (it[i].resourceType == 5) {
|
||||
CommonWebViewActivity.start(context, it[i].resourceContent)
|
||||
} else {
|
||||
dialogManager.showProgressDialog(mContext)
|
||||
homeViewModel.getResourceJumpInfo(it[i].id)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,11 +98,6 @@ class RecommendFragment : BaseFragment(),
|
||||
}
|
||||
}
|
||||
|
||||
mBinding.tvMore.setOnClickListener {
|
||||
(parentFragment as HomeFragment).onItemSelect(1, null)
|
||||
StatisticManager.Instance()
|
||||
.onEvent(StatisticsProtocol.EVENT_ZXTJ_ROOM_MORE_CLICK, ResUtil.getString(R.string.home_fragment_recommendfragment_04))
|
||||
}
|
||||
}
|
||||
|
||||
private fun initRefreshView() {
|
||||
@@ -151,68 +107,63 @@ class RecommendFragment : BaseFragment(),
|
||||
}
|
||||
mBinding.refreshLayout.isEnableLoadmore = false
|
||||
mBinding.refreshLayout.isEnableOverScrollBounce = false
|
||||
val themeColor = requireContext().resources.getColor(R.color.color_666666)
|
||||
mBinding.refreshHeader.lastUpdateText.setTextColor(themeColor)
|
||||
mBinding.refreshHeader.titleText.setTextColor(themeColor)
|
||||
mBinding.refreshHeader.setBackgroundColor(Color.TRANSPARENT)
|
||||
val progressDrawable = ProgressDrawable()
|
||||
progressDrawable.setColor(themeColor)
|
||||
mBinding.refreshHeader.progressView.setImageDrawable(progressDrawable)
|
||||
}
|
||||
|
||||
private fun initTitleTab() {
|
||||
val tagList = InitialModel.get().cacheInitInfo?.homeTabList.let {
|
||||
if (it?.size == 2) it else arrayListOf( ResUtil.getString(R.string.home_fragment_recommendfragment_05),ResUtil.getString(R.string.home_fragment_recommendfragment_06))
|
||||
}
|
||||
mFragmentsBottom.add(HomePlayFragment.newInstance())
|
||||
mFragmentsBottom.add(RoomHotFragment.newInstance())
|
||||
if (tagList[0] != ResUtil.getString(R.string.home_fragment_recommendfragment_07)) {
|
||||
mFragmentsBottom.reverse()
|
||||
}
|
||||
val commonNavigator = CommonNavigator(context)
|
||||
commonNavigator.setTitleWrapContent(true)
|
||||
val magicIndicatorAdapter = MainMagicIndicatorAdapter(context, tagList)
|
||||
magicIndicatorAdapter.textSize = 16
|
||||
magicIndicatorAdapter.setOnItemSelectListener(this)
|
||||
commonNavigator.adapter = magicIndicatorAdapter
|
||||
mBinding.magicIndicator.navigator = commonNavigator
|
||||
commonNavigator.titleContainer.showDividers = LinearLayout.SHOW_DIVIDER_MIDDLE
|
||||
mBinding.viewPager.offscreenPageLimit = 5
|
||||
mBinding.viewPager.adapter =
|
||||
RoomVPAdapter(childFragmentManager, mFragmentsBottom)
|
||||
ViewPagerHelper.bind(mBinding.magicIndicator, mBinding.viewPager)
|
||||
}
|
||||
|
||||
private fun initSingleAnchor() {
|
||||
singleAnchorAdapter = HomeSingleAnchorAdapter()
|
||||
mBinding.rvSingleAnchor.adapter = singleAnchorAdapter
|
||||
val layoutManager =
|
||||
LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
|
||||
mBinding.rvSingleAnchor.layoutManager = layoutManager
|
||||
homeViewModel.singleAnchorHomeLiveData.observe(this) {
|
||||
if (it.data.isNullOrEmpty()) {
|
||||
mBinding.llSingleAnchor.visibility = View.GONE
|
||||
mBinding.rvSingleAnchor.visibility = View.GONE
|
||||
} else {
|
||||
mBinding.llSingleAnchor.visibility = View.VISIBLE
|
||||
mBinding.rvSingleAnchor.visibility = View.VISIBLE
|
||||
private fun initChatTab() {
|
||||
charAdapter = HomeChatAdapter()
|
||||
charAdapter.onItemClickListener =
|
||||
BaseQuickAdapter.OnItemClickListener { _: BaseQuickAdapter<*, *>?, _: View?, position: Int ->
|
||||
val homePlayInfo: HomeRoomInfo? = charAdapter.getItem(position)
|
||||
if (homePlayInfo != null) {
|
||||
StatisticManager.Instance().onEvent(
|
||||
StatisticsProtocol.EVENT_KH_ROOM_SUCCESS,
|
||||
ResUtil.getString(R.string.home_fragment_homeplayfragment_02)
|
||||
)
|
||||
AVRoomActivity.startForFromType(
|
||||
mContext,
|
||||
homePlayInfo.uid,
|
||||
AVRoomActivity.FROM_TYPE_RECOMMEND
|
||||
)
|
||||
}
|
||||
}
|
||||
singleAnchorAdapter.setNewData(it.data)
|
||||
mBinding.mRecyclerChat.adapter = charAdapter
|
||||
mBinding.mLiCreateRoom.setOnClickListener {
|
||||
OpenRoomHelper.openRoom(context as BaseActivity?)
|
||||
}
|
||||
mBinding.llSingleAnchor.setOnClickListener {
|
||||
(parentFragment as HomeFragment).onItemSelect(2, null)
|
||||
StatisticManager.Instance()
|
||||
.onEvent(StatisticsProtocol.EVENT_RQZB_ROOM_MORE_CLICK, ResUtil.getString(R.string.home_fragment_recommendfragment_08))
|
||||
homeViewModel.homePlayInfoData.observe(this) {
|
||||
it?.let {
|
||||
if (it.isNotEmpty()) {
|
||||
mBinding.mLiCreateRoom.visibility = View.GONE
|
||||
mBinding.mRecyclerChat.visibility = View.VISIBLE
|
||||
charAdapter.setNewData(it)
|
||||
} else {
|
||||
mBinding.mLiCreateRoom.visibility = View.VISIBLE
|
||||
mBinding.mRecyclerChat.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onItemSelect(position: Int, view: TextView?) {
|
||||
if (mFragmentsBottom.isEmpty()) {
|
||||
return
|
||||
private fun initHotRoomTab() {
|
||||
roomHotAdapter = HomeHotAdapter()
|
||||
roomHotAdapter.onItemClickListener =
|
||||
BaseQuickAdapter.OnItemClickListener { _: BaseQuickAdapter<*, *>?, _: View?, position: Int ->
|
||||
val homePlayInfo: HomeRoomInfo? = roomHotAdapter.getItem(position)
|
||||
if (homePlayInfo != null) {
|
||||
AVRoomActivity.start(mContext, homePlayInfo.uid)
|
||||
StatisticManager.Instance()
|
||||
.onEvent(
|
||||
StatisticsProtocol.EVENT_RM_ROOM_SUCCESS,
|
||||
ResUtil.getString(R.string.home_adapter_roomhotadapter_01)
|
||||
)
|
||||
}
|
||||
}
|
||||
mBinding.mRecyclerRoom.adapter = roomHotAdapter
|
||||
homeViewModel.homeHotRoomLiveData.observe(this) {
|
||||
it?.let {
|
||||
roomHotAdapter.setNewData(it)
|
||||
}
|
||||
}
|
||||
mBinding.viewPager.currentItem = position
|
||||
StatisticManager.Instance()
|
||||
.onEvent(StatisticsProtocol.EVENT_TJ_TABEXCHANGE, ResUtil.getString(R.string.home_fragment_recommendfragment_09))
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
@@ -226,6 +177,8 @@ class RecommendFragment : BaseFragment(),
|
||||
homeViewModel.getBannerInfo()
|
||||
homeViewModel.getHomeResource()
|
||||
homeViewModel.getHomeSingleAnchorList()
|
||||
homeViewModel.getHomePlayV2()
|
||||
homeViewModel.getHotRoom()
|
||||
}
|
||||
|
||||
|
||||
|
@@ -611,8 +611,8 @@ public class MessageFragment extends TFragment implements ModuleProxy, MessageLi
|
||||
int charmLevelIndex = privacyAgreementDescTip.indexOf(charmLevel);
|
||||
|
||||
|
||||
ss.setSpan(new ForegroundColorSpan(ContextCompat.getColor(getContext(), R.color.appColor)), experLevelIndex, experLevelIndex + experLevel.length(), Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
|
||||
ss.setSpan(new OriginalDrawStatusClickSpan(ContextCompat.getColor(getContext(), R.color.appColor)) {
|
||||
ss.setSpan(new ForegroundColorSpan(ContextCompat.getColor(getContext(), R.color.color_9168FA)), experLevelIndex, experLevelIndex + experLevel.length(), Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
|
||||
ss.setSpan(new OriginalDrawStatusClickSpan(ContextCompat.getColor(getContext(), R.color.color_9168FA)) {
|
||||
@Override
|
||||
public void onClick(@NonNull View widget) {
|
||||
if (widget instanceof TextView)
|
||||
@@ -621,8 +621,8 @@ public class MessageFragment extends TFragment implements ModuleProxy, MessageLi
|
||||
CommonWebViewActivity.start(getContext(), UriProvider.getUserLevelUrl());
|
||||
}
|
||||
}, experLevelIndex, experLevelIndex + experLevel.length(), Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
|
||||
ss.setSpan(new ForegroundColorSpan(ContextCompat.getColor(getContext(), R.color.appColor)), charmLevelIndex, charmLevelIndex + charmLevel.length(), Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
|
||||
ss.setSpan(new OriginalDrawStatusClickSpan(ContextCompat.getColor(getContext(), R.color.appColor)) {
|
||||
ss.setSpan(new ForegroundColorSpan(ContextCompat.getColor(getContext(), R.color.color_9168FA)), charmLevelIndex, charmLevelIndex + charmLevel.length(), Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
|
||||
ss.setSpan(new OriginalDrawStatusClickSpan(ContextCompat.getColor(getContext(), R.color.color_9168FA)) {
|
||||
@Override
|
||||
public void onClick(@NonNull View widget) {
|
||||
if (widget instanceof TextView)
|
||||
|
@@ -591,7 +591,7 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
||||
currentGiftInfoList = GiftModel.get().getKnapList();
|
||||
} else if (position == GiftIndicator.TYPE_NOBLE) {
|
||||
currentGiftInfoList = nobleGiftInfos;
|
||||
ivOpenNoble.setVisibility(View.VISIBLE);
|
||||
ivOpenNoble.setVisibility(View.GONE);
|
||||
} else if (position == GiftIndicator.TYPE_NORMAL) {
|
||||
currentGiftInfoList = getNormalGiftInfos();
|
||||
} else if (position == GiftIndicator.TYPE_LUCKY) {
|
||||
|
BIN
app/src/main/res/drawable-xhdpi/bg_home_chat_man.webp
Normal file
After Width: | Height: | Size: 9.3 KiB |
BIN
app/src/main/res/drawable-xhdpi/bg_home_chat_women.webp
Normal file
After Width: | Height: | Size: 9.6 KiB |
Before Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_home_chat_add.webp
Normal file
After Width: | Height: | Size: 7.8 KiB |
Before Width: | Height: | Size: 1.3 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_home_hot_hot.webp
Normal file
After Width: | Height: | Size: 1008 B |
9
app/src/main/res/drawable/bg_ffffff_14.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<corners android:radius="@dimen/dp_14"/>
|
||||
|
||||
<solid android:color="@color/color_FFFFFF"/>
|
||||
|
||||
</shape>
|
14
app/src/main/res/drawable/bg_home_chat.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:endColor="#E7D7FC"
|
||||
android:startColor="#D7F8FD"
|
||||
android:type="linear"
|
||||
android:useLevel="true" />
|
||||
<corners android:radius="@dimen/dp_10" />
|
||||
|
||||
|
||||
</shape>
|
@@ -29,41 +29,23 @@
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
<TextView
|
||||
android:id="@+id/tv_toolbar_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_toolbar_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:ellipsize="end"
|
||||
android:maxWidth="214dp"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/Toolbar.TitleText"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:visibility="gone"
|
||||
tools:text="@string/layout_activity_p2p_message_01"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_attention"
|
||||
android:layout_width="19dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="3dp"
|
||||
android:src="@drawable/ic_chat_navigation_attention"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</LinearLayout>
|
||||
android:layout_gravity="center_vertical"
|
||||
android:ellipsize="end"
|
||||
android:maxWidth="214dp"
|
||||
android:maxLines="1"
|
||||
android:singleLine="true"
|
||||
android:textAppearance="@style/Toolbar.TitleText"
|
||||
android:textColor="@color/text_title_color"
|
||||
android:visibility="gone"
|
||||
tools:text="@string/layout_activity_p2p_message_01"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_add_black_tip"
|
||||
@@ -76,18 +58,40 @@
|
||||
android:textSize="12dp" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/iv_add_black_list"
|
||||
android:layout_width="?attr/actionBarSize"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:layout_gravity="right"
|
||||
android:gravity="center"
|
||||
android:src="@drawable/icon_add_black_list"
|
||||
android:text="@string/layout_activity_p2p_message_03"
|
||||
android:textColor="@color/text_normal_c6c6e9"
|
||||
android:textSize="@dimen/dp_13"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:orientation="horizontal"
|
||||
android:layout_gravity="end"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="24dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_attention"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:src="@drawable/ic_chat_navigation_attention"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/iv_add_black_list"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/iv_add_black_list"
|
||||
android:layout_width="?attr/actionBarSize"
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:gravity="center"
|
||||
android:src="@drawable/icon_add_black_list"
|
||||
android:text="@string/layout_activity_p2p_message_03"
|
||||
android:textColor="@color/color_b3b3b3"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.appcompat.widget.Toolbar>
|
||||
|
||||
|
@@ -38,6 +38,7 @@
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="25dp"
|
||||
android:gravity="center_vertical"
|
||||
android:visibility="gone"
|
||||
android:text="@string/layout_dialog_bottom_face_02"
|
||||
android:textColor="@color/bg_gift_tab_color_selector"
|
||||
android:textSize="14dp" />
|
||||
@@ -69,6 +70,6 @@
|
||||
android:layout_marginEnd="15dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/ic_vip_gift_dialog"
|
||||
android:visibility="visible" />
|
||||
android:visibility="gone" />
|
||||
|
||||
</RelativeLayout>
|
@@ -18,228 +18,123 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.scwang.smartrefresh.layout.header.ClassicsHeader
|
||||
android:id="@+id/refresh_header"
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content" />
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:id="@+id/coordinator_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/app_bar_layout"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/transparent"
|
||||
app:elevation="0dp"
|
||||
app:layout_behavior="com.yizhuan.erban.ui.widget.AppBarLayoutBehavior">
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.google.android.material.appbar.CollapsingToolbarLayout
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_roll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:contentScrim="@color/transparent"
|
||||
app:layout_scrollFlags="scroll|enterAlwaysCollapsed">
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_15">
|
||||
|
||||
<LinearLayout
|
||||
<com.yizhuan.erban.ui.widget.rollviewpager.RollPagerView
|
||||
android:id="@+id/roll_view"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="690:260"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:rollviewpager_hint_gravity="left"
|
||||
app:rollviewpager_hint_paddingBottom="8dp"
|
||||
tools:visibility="gone" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/fg_recommend_room"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/dp_5"
|
||||
android:paddingBottom="@dimen/dp_5"
|
||||
android:visibility="visible"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:includeFontPadding="false"
|
||||
android:text="@string/extender_column_chat"
|
||||
android:textColor="@color/color_1F1A4E"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/mLiCreateRoom"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:gravity="center_vertical"
|
||||
android:background="@drawable/bg_home_chat"
|
||||
android:visibility="gone"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="64dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_marginStart="@dimen/dp_12"
|
||||
android:src="@drawable/ic_home_chat_add"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"/>
|
||||
|
||||
<TextView
|
||||
android:text="@string/create_home_play"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:textColor="@color/color_1F1A4E"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_roll_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginEnd="@dimen/dp_15">
|
||||
</LinearLayout>
|
||||
|
||||
<com.yizhuan.erban.ui.widget.rollviewpager.RollPagerView
|
||||
android:id="@+id/roll_view"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintDimensionRatio="690:260"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:rollviewpager_hint_gravity="left"
|
||||
app:rollviewpager_hint_paddingBottom="8dp"
|
||||
tools:visibility="gone" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_resource"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.yizhuan.erban.ui.widget.RectLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="176"
|
||||
app:hw_ratio="0.341">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_resource_0"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/default_banner" />
|
||||
|
||||
</com.yizhuan.erban.ui.widget.RectLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="4" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_resource_1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="82"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/default_banner" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="4" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_resource_2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="82"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/default_banner" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_recommend_room"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableStart="@drawable/ic_home_recommend_tag"
|
||||
android:drawablePadding="4dp"
|
||||
android:includeFontPadding="false"
|
||||
android:paddingStart="16dp"
|
||||
android:text="@string/layout_fragment_recommend_01"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:visibility="visible"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_more"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:drawableRight="@drawable/arrow_right"
|
||||
android:drawablePadding="2dp"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:text="@string/layout_fragment_recommend_02"
|
||||
android:textColor="#b3333333"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/fg_recommend_room"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="@dimen/dp_5"
|
||||
android:paddingBottom="@dimen/dp_5"
|
||||
android:visibility="visible"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/ll_single_anchor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingTop="5dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:includeFontPadding="false"
|
||||
android:text="@string/layout_fragment_recommend_03"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|center_vertical"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:drawableRight="@drawable/arrow_right"
|
||||
android:drawablePadding="@dimen/dp_3"
|
||||
android:text="@string/layout_fragment_recommend_04"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="10sp" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_single_anchor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:overScrollMode="never"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingTop="@dimen/dp_10"
|
||||
android:paddingEnd="5dp"
|
||||
android:paddingBottom="@dimen/dp_10"
|
||||
android:scrollbars="none"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.appbar.CollapsingToolbarLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_indicator"
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/mRecyclerChat"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="5dp">
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:orientation="horizontal"
|
||||
android:overScrollMode="never"
|
||||
android:paddingStart="0dp"
|
||||
android:paddingEnd="@dimen/dp_15"
|
||||
android:scrollbars="none"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
||||
|
||||
<com.yizhuan.erban.ui.widget.magicindicator.MagicIndicator
|
||||
android:id="@+id/magic_indicator"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:paddingLeft="13dp"
|
||||
android:paddingRight="10dp" />
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:includeFontPadding="false"
|
||||
android:text="@string/extender_room_party"
|
||||
android:textColor="@color/color_1F1A4E"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</FrameLayout>
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/mRecyclerRoom"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</com.scwang.smartrefresh.layout.SmartRefreshLayout>
|
||||
|
||||
|
30
app/src/main/res/layout/item_home_chat.xml
Normal file
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/root_view"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<View
|
||||
android:id="@+id/mViewBg"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
android:background="@drawable/bg_home_chat_man"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
||||
<com.yizhuan.erban.common.widget.CircleImageView
|
||||
android:id="@+id/mCirImage"
|
||||
android:layout_width="54dp"
|
||||
android:layout_height="54dp"
|
||||
android:src="@drawable/default_avatar"
|
||||
app:layout_constraintStart_toStartOf="@+id/mViewBg"
|
||||
app:layout_constraintEnd_toEndOf="@+id/mViewBg"
|
||||
app:layout_constraintTop_toTopOf="@+id/mViewBg"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/mViewBg"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -4,28 +4,31 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:layout_marginEnd="10dp">
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:clipChildren="false"
|
||||
android:clipToPadding="false"
|
||||
android:paddingStart="@dimen/dp_36"
|
||||
android:paddingEnd="0dp">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="74dp"
|
||||
android:layout_marginTop="7.5dp"
|
||||
android:background="@drawable/bg_home_common_item"
|
||||
android:layout_height="84dp"
|
||||
android:background="@drawable/bg_ffffff_14"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
<com.yizhuan.erban.common.widget.CircleImageView
|
||||
android:id="@+id/iv_room_image"
|
||||
android:layout_width="74dp"
|
||||
android:layout_height="74dp"
|
||||
android:layout_marginStart="3dp"
|
||||
android:layout_marginStart="-22dp"
|
||||
android:src="@drawable/default_cover"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/view_bg"
|
||||
app:riv_corner_radius="8dp" />
|
||||
|
||||
<TextView
|
||||
@@ -37,36 +40,26 @@
|
||||
android:includeFontPadding="false"
|
||||
android:text="@string/layout_item_room_common_01"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="12dp"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_room_image"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_room_image"
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
||||
<View
|
||||
android:id="@+id/view_room_cover"
|
||||
android:layout_width="74dp"
|
||||
android:layout_height="74dp"
|
||||
android:background="@drawable/bg_home_common_avatar"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_room_image"
|
||||
app:layout_constraintEnd_toEndOf="@id/iv_room_image"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_room_image"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_room_image" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_room_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/text_primary"
|
||||
android:textColor="@color/color_1F1A4E"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toTopOf="@id/iv_room_tag"
|
||||
app:layout_constraintStart_toEndOf="@id/view_room_cover"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_room_image"
|
||||
app:layout_constraintTop_toTopOf="@+id/iv_room_image"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
tools:text="@string/layout_item_room_common_02" />
|
||||
|
||||
@@ -74,9 +67,9 @@
|
||||
android:id="@+id/iv_room_tag"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="14dp"
|
||||
android:layout_marginTop="11dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_room_title"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_room_image"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_room_title"
|
||||
tools:src="@drawable/tag_101" />
|
||||
|
||||
@@ -84,11 +77,13 @@
|
||||
android:id="@+id/tv_id"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="6dp"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_marginTop="10dp"
|
||||
android:includeFontPadding="false"
|
||||
android:textColor="#66333333"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_room_tag"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_room_tag"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_room_title"
|
||||
tools:text="ID:1234" />
|
||||
|
||||
<TextView
|
||||
@@ -96,13 +91,13 @@
|
||||
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:layout_marginEnd="@dimen/dp_12"
|
||||
android:drawablePadding="2dp"
|
||||
android:gravity="bottom"
|
||||
android:includeFontPadding="false"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="12sp"
|
||||
app:drawableStartCompat="@drawable/ic_home_hot_hot"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="266" />
|
||||
|
@@ -4898,5 +4898,8 @@
|
||||
<string name="yizhuan_erban_exampleunittest_020">emoji第二個字節:</string>
|
||||
<string name="not_yet_joined_guild">暫未加入公會</string>
|
||||
<string name="search_id_room">搜索昵稱/ID/房間</string>
|
||||
<string name="extender_column_chat">擴列聊天</string>
|
||||
<string name="extender_room_party">房間派對</string>
|
||||
<string name="create_home_play">快來創建房間一起開黑吧~</string>
|
||||
|
||||
</resources>
|
@@ -105,7 +105,7 @@ public class XChatConstants {
|
||||
/**
|
||||
* 友盟統計 key
|
||||
*/
|
||||
public static final String UMENG_APP_KEY = "5ff6bc27adb42d5826a1cb97";//已更改
|
||||
public static final String UMENG_APP_KEY = "634d1fbf88ccdf4b7e4bcb0e";//已更改
|
||||
|
||||
/**
|
||||
* linkedMe key
|
||||
|
@@ -182,6 +182,10 @@ object HomeModel : BaseModel() {
|
||||
api.requestAnchorInfo()
|
||||
}
|
||||
|
||||
suspend fun getHomePlayV2(): List<HomeRoomInfo>? =
|
||||
launchRequest {
|
||||
api.apiHomePlayV2()
|
||||
}
|
||||
|
||||
private interface Api {
|
||||
/**
|
||||
@@ -381,6 +385,15 @@ object HomeModel : BaseModel() {
|
||||
*/
|
||||
@GET("user/get/userCard")
|
||||
suspend fun requestAnchorInfo(): ServiceResult<AnchorInfo>
|
||||
|
||||
/**
|
||||
* 首页聊天交友
|
||||
*
|
||||
* @return -
|
||||
*/
|
||||
@GET("/home/playV2")
|
||||
suspend fun apiHomePlayV2(): ServiceResult<List<HomeRoomInfo>>
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -417,7 +417,7 @@ public class AuthModel extends BaseModel implements IAuthModel {
|
||||
public void onComplete(Platform platform, int i, HashMap<String, Object> hashMap) {
|
||||
if (i == Platform.ACTION_USER_INFOR) {
|
||||
String openid = platform.getDb().getUserId();
|
||||
String unionid = platform.getDb().getUserId();
|
||||
String unionid = platform.getDb().get("unionid");
|
||||
Logger.i("openid:" + openid + " unionid:" + unionid + platform.getDb().getUserIcon());
|
||||
|
||||
thirdUserInfo = new ThirdUserInfo();
|
||||
@@ -447,7 +447,7 @@ public class AuthModel extends BaseModel implements IAuthModel {
|
||||
})
|
||||
.flatMap(platform -> {
|
||||
String openid = platform.getDb().getUserId();
|
||||
String unionid = platform.getDb().get("unionid");
|
||||
String unionid = platform.getDb().getUserId();
|
||||
String avatar = thirdUserInfo.getUserIcon();
|
||||
if (avatar != null && avatar.equals("null")) {
|
||||
avatar = null;
|
||||
@@ -487,7 +487,7 @@ public class AuthModel extends BaseModel implements IAuthModel {
|
||||
public void onComplete(Platform platform, int i, HashMap<String, Object> hashMap) {
|
||||
if (i == Platform.ACTION_USER_INFOR) {
|
||||
String openid = platform.getDb().getUserId();
|
||||
String unionid = platform.getDb().getUserId();
|
||||
String unionid = platform.getDb().get("unionid");
|
||||
Logger.i("openid:" + openid + " unionid:" + unionid + platform.getDb().getUserIcon());
|
||||
|
||||
thirdUserInfo = new ThirdUserInfo();
|
||||
@@ -518,7 +518,7 @@ public class AuthModel extends BaseModel implements IAuthModel {
|
||||
})
|
||||
.flatMap(platform -> {
|
||||
String openid = platform.getDb().getUserId();
|
||||
String unionid = platform.getDb().get("unionid");
|
||||
String unionid = platform.getDb().getUserId();
|
||||
String avatar = thirdUserInfo.getUserIcon();
|
||||
if (avatar != null && avatar.equals("null")) {
|
||||
avatar = null;
|
||||
|
@@ -24,5 +24,5 @@ only_arm64=false
|
||||
|
||||
channel_file=channel.txt
|
||||
|
||||
version_name=1.0.2
|
||||
version_code=102
|
||||
version_name=1.0.3
|
||||
version_code=103
|
Before Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 2.0 KiB |
BIN
nim_uikit/res/drawable-xhdpi/nim_message_input_plus.webp
Normal file
After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 1.3 KiB |
@@ -3,6 +3,6 @@
|
||||
|
||||
<item android:drawable="@drawable/nim_message_input_emotion_pressed" android:state_pressed="true"/>
|
||||
<item android:drawable="@drawable/nim_message_input_emotion_pressed" android:state_focused="true"/>
|
||||
<item android:drawable="@drawable/nim_message_input_emotion"/>
|
||||
<item android:drawable="@drawable/nim_message_input_emotion_pressed"/>
|
||||
|
||||
</selector>
|
@@ -72,7 +72,7 @@
|
||||
android:paddingStart="@dimen/dp_10"
|
||||
android:paddingEnd="10dp"
|
||||
android:textColor="@color/color_C6C6E9"
|
||||
android:textColorHint="@color/text_hint_555574"
|
||||
android:textColorHint="@color/color_b3b3b3"
|
||||
android:textCursorDrawable="@null"
|
||||
android:textSize="13sp" />
|
||||
|
||||
|