1 关系系统 UI调整 2 修改数消息解析
This commit is contained in:
@@ -130,6 +130,7 @@ import com.yizhuan.xchat_android_core.im.custom.bean.AssistantAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.CarAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.CarveUpGoldThirdLevelAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.ChatHintAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.CpInviteAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.GiftAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.InAppSharingFamilyAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.InAppSharingMiniWorldAttachment;
|
||||
@@ -414,6 +415,8 @@ public class MainActivity extends BaseMvpActivity<IMainView, MainPresenter>
|
||||
NimUIKit.registerMsgItemViewHolder(ChatHintAttachment.class, MsgViewHolderChatHint.class);
|
||||
|
||||
NimUIKit.registerMsgItemViewHolder(MatchAttachment.class, MsgViewHolderMatch.class);
|
||||
//CP
|
||||
NimUIKit.registerMsgItemViewHolder(CpInviteAttachment.class, MsgViewHolderText.class);
|
||||
NimUIKit.setSessionListener(listener);
|
||||
NimUIKit.setContactEventListener(listener1);
|
||||
}
|
||||
|
@@ -9,13 +9,16 @@ import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.base.BaseBindingActivity
|
||||
import com.yizhuan.erban.base.TitleBar
|
||||
import com.yizhuan.erban.databinding.ActivityCpHomeBinding
|
||||
import com.yizhuan.erban.relation.cp.CpDataManager
|
||||
import com.yizhuan.erban.relation.cp.event.CpBindUnbindEvent
|
||||
import com.yizhuan.erban.relation.cp.viewmodel.CpViewModel
|
||||
import com.yizhuan.erban.relation.cp.widget.RelationCpCardView.Companion.PAGE_TYPE_SELF_CP
|
||||
import com.yizhuan.erban.ui.relation.FansListActivity
|
||||
import com.yizhuan.erban.ui.user.UserInfoActivity
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel
|
||||
import com.yizhuan.xchat_android_library.annatation.ActLayoutRes
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import org.greenrobot.eventbus.Subscribe
|
||||
import org.greenrobot.eventbus.ThreadMode
|
||||
|
||||
@ActLayoutRes(R.layout.activity_cp_home)
|
||||
class CpHomeActivity : BaseBindingActivity<ActivityCpHomeBinding>() {
|
||||
@@ -40,23 +43,35 @@ class CpHomeActivity : BaseBindingActivity<ActivityCpHomeBinding>() {
|
||||
toUserInfoActivity(vm.cpRelation.value?.cpUid)
|
||||
}
|
||||
}
|
||||
R.id.tv_recovery_unbind -> vm.revertUnbindCp()
|
||||
R.id.tv_recovery_unbind -> {
|
||||
dialogManager.showOkCancelWithTitleDialog(
|
||||
resources.getString(R.string.cp_revert_tip)
|
||||
) {
|
||||
vm.revertUnbindCp()
|
||||
}
|
||||
}
|
||||
R.id.iv_unbind -> {
|
||||
dialogManager.showOkCancelWithTitleDialog(
|
||||
resources.getString(R.string.cp_unbind_tip)
|
||||
) {
|
||||
vm.unBindCp()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun initObserver() {
|
||||
EventBus.getDefault().register(this)
|
||||
vm.loadingLiveData.observe(this) {
|
||||
if (it) dialogManager.showProgressDialog(this)
|
||||
else dialogManager.dismissDialog()
|
||||
}
|
||||
|
||||
vm.cpRelation.observe(this) {
|
||||
CpDataManager.get().cpRelation = it
|
||||
mBinding.cpCardView.setCpEntityData(mUserId, PAGE_TYPE_SELF_CP, it)
|
||||
if (it.cpUid != 0L) {
|
||||
//initRightTitle()
|
||||
initRightTitle()
|
||||
}
|
||||
initRightTitle()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,8 +97,13 @@ class CpHomeActivity : BaseBindingActivity<ActivityCpHomeBinding>() {
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
fun onRelationChange(event: CpBindUnbindEvent) {
|
||||
vm.getCpRelation(mUserId)
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
CpDataManager.get().clear()
|
||||
EventBus.getDefault().unregister(this)
|
||||
}
|
||||
}
|
@@ -8,7 +8,6 @@ import androidx.activity.viewModels
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.base.BaseBindingActivity
|
||||
import com.yizhuan.erban.databinding.ActivityCpTaskBinding
|
||||
import com.yizhuan.erban.relation.cp.CpDataManager
|
||||
import com.yizhuan.erban.relation.cp.adapter.CpTaskIndicatorAdapter
|
||||
import com.yizhuan.erban.relation.cp.adapter.TaskPagerAdapter
|
||||
import com.yizhuan.erban.relation.cp.fragment.CpTaskFragment
|
||||
@@ -32,16 +31,11 @@ class CpTaskActivity : BaseBindingActivity<ActivityCpTaskBinding>(),
|
||||
|
||||
override fun init() {
|
||||
initTitleBar("关系任务")
|
||||
if (CpDataManager.get().cpRelation == null) {
|
||||
vm.cpRelation.observe(this) {
|
||||
CpDataManager.get().cpRelation = it
|
||||
}
|
||||
vm.loadingLiveData.observe(this) {
|
||||
if (it) dialogManager.showProgressDialog(this)
|
||||
else dialogManager.dismissDialog()
|
||||
}
|
||||
vm.getCpRelation(AuthModel.get().currentUid)
|
||||
vm.loadingLiveData.observe(this) {
|
||||
if (it) dialogManager.showProgressDialog(this)
|
||||
else dialogManager.dismissDialog()
|
||||
}
|
||||
vm.cpTaskProcess(AuthModel.get().currentUid)
|
||||
setViewPager()
|
||||
setCpLevelContent()
|
||||
}
|
||||
|
@@ -29,7 +29,7 @@ class InviteRecordAdapter(private val context: Context) :
|
||||
val tvVisit = helper.getView<TextView>(R.id.tv_visit)
|
||||
item?.state?.let {
|
||||
when (it) {
|
||||
1 -> tvVisit.text = context.resources.getString(R.string.invite_cp_state_invited)
|
||||
1 -> tvVisit.text = "查看"
|
||||
2 -> tvVisit.text = context.resources.getString(R.string.invite_cp_state_agreed)
|
||||
3 -> tvVisit.text = context.resources.getString(R.string.invite_cp_state_refused)
|
||||
4 -> tvVisit.text = context.resources.getString(R.string.invite_cp_state_unbinding)
|
||||
|
@@ -0,0 +1,79 @@
|
||||
package com.yizhuan.erban.relation.cp.dialog
|
||||
|
||||
import android.content.Context
|
||||
import android.view.Gravity
|
||||
import android.view.View
|
||||
import com.netease.nim.uikit.common.util.sys.ScreenUtil
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.databinding.DialogCpGlobalBinding
|
||||
import com.yizhuan.erban.treasure_box.widget.dialog.BaseBindingDialog
|
||||
import com.yizhuan.xchat_android_library.annatation.ActLayoutRes
|
||||
import io.reactivex.*
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.disposables.CompositeDisposable
|
||||
import io.reactivex.disposables.Disposable
|
||||
import io.reactivex.schedulers.Schedulers
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
@ActLayoutRes(R.layout.dialog_cp_global)
|
||||
class CpGlobalDialog(context: Context) :
|
||||
View.OnClickListener,
|
||||
BaseBindingDialog<DialogCpGlobalBinding>(context) {
|
||||
private val disposeSet: CompositeDisposable by lazy {
|
||||
CompositeDisposable()
|
||||
}
|
||||
|
||||
override fun init() {
|
||||
window?.attributes?.let {
|
||||
it.y = ScreenUtil.dip2px(44f)
|
||||
it.dimAmount = 1f
|
||||
gravity = Gravity.TOP
|
||||
}
|
||||
binding.ivClose.setOnClickListener(this)
|
||||
binding.tvVisit.setOnClickListener(this)
|
||||
setCancelable(false)
|
||||
}
|
||||
|
||||
override fun onClick(v: View) {
|
||||
when (v.id) {
|
||||
R.id.iv_close -> {
|
||||
closeDialog()
|
||||
}
|
||||
R.id.tv_visit -> {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
Observable.interval(1000, TimeUnit.MILLISECONDS)
|
||||
.subscribeOn(Schedulers.computation())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(object : Observer<Long> {
|
||||
override fun onSubscribe(d: Disposable) {
|
||||
disposeSet.add(d)
|
||||
}
|
||||
|
||||
override fun onNext(t: Long) {
|
||||
binding.tvSec.text = "${5L - t}s"
|
||||
if (t == 5L) unregisterTimer()
|
||||
}
|
||||
|
||||
override fun onError(e: Throwable) {}
|
||||
override fun onComplete() {}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
unregisterTimer()
|
||||
}
|
||||
|
||||
private fun unregisterTimer() {
|
||||
if (!disposeSet.isDisposed) {
|
||||
disposeSet.dispose()
|
||||
}
|
||||
}
|
||||
}
|
@@ -17,6 +17,7 @@ class CpInviteReplyConfirmDialog(context: Context) :
|
||||
var okCancelListener: CommonTipDialog.OnActionListener? = null
|
||||
override fun init() {
|
||||
width = ScreenUtil.dip2px(300f)
|
||||
height = ScreenUtil.dip2px(180f)
|
||||
binding.click = this
|
||||
binding.tvMessage.text = text
|
||||
}
|
||||
|
@@ -0,0 +1,5 @@
|
||||
package com.yizhuan.erban.relation.cp.event;
|
||||
|
||||
public class CpBindUnbindEvent {
|
||||
|
||||
}
|
@@ -1,18 +1,20 @@
|
||||
package com.yizhuan.erban.relation.cp.fragment
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.base.BaseBindingFragment
|
||||
import com.yizhuan.erban.databinding.FragmentCpTaskBinding
|
||||
import com.yizhuan.erban.relation.cp.CpDataManager
|
||||
import com.yizhuan.erban.relation.cp.adapter.CpTaskAdapter
|
||||
import com.yizhuan.erban.relation.cp.viewmodel.CpViewModel
|
||||
import com.yizhuan.xchat_android_library.annatation.ActLayoutRes
|
||||
|
||||
@ActLayoutRes(R.layout.fragment_cp_task)
|
||||
class CpTaskFragment : BaseBindingFragment<FragmentCpTaskBinding>() {
|
||||
private var pageType: Int = 0
|
||||
private lateinit var adapter: CpTaskAdapter
|
||||
private val vm: CpViewModel by activityViewModels()
|
||||
override fun initiate() {
|
||||
arguments?.let {
|
||||
pageType = it.getInt("type")
|
||||
@@ -21,7 +23,7 @@ class CpTaskFragment : BaseBindingFragment<FragmentCpTaskBinding>() {
|
||||
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
||||
adapter = CpTaskAdapter()
|
||||
adapter.bindToRecyclerView(mBinding.recyclerView)
|
||||
CpDataManager.get().cpRelation?.let {
|
||||
vm.cpTaskData.value?.let {
|
||||
when (pageType) {
|
||||
TYPE_DAILY -> {
|
||||
adapter.setNewData(it.dailyTask)
|
||||
|
@@ -10,6 +10,7 @@ import com.yizhuan.erban.relation.cp.viewmodel.CpViewModel
|
||||
import com.yizhuan.erban.relation.cp.widget.RelationCpCardView
|
||||
import com.yizhuan.erban.ui.im.friend.FriendFragmentCpDelegate
|
||||
import com.yizhuan.erban.ui.relation.FansListActivity
|
||||
import com.yizhuan.erban.ui.utils.ImageLoadUtils
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel
|
||||
import com.yizhuan.xchat_android_library.annatation.ActLayoutRes
|
||||
|
||||
@@ -23,7 +24,7 @@ class UserInfoCpFragment : BaseViewBindingFragment<FragmentUserinfoCpBinding>(),
|
||||
}
|
||||
|
||||
override fun init() {
|
||||
uid = arguments?.getLong("type")
|
||||
uid = arguments?.getLong("uid")
|
||||
val isSelf = uid == AuthModel.get().currentUid
|
||||
val type = if (isSelf) RelationCpCardView.PAGE_TYPE_SELF_INFO
|
||||
else RelationCpCardView.PAGE_TYPE_CUS_INFO
|
||||
@@ -32,6 +33,13 @@ class UserInfoCpFragment : BaseViewBindingFragment<FragmentUserinfoCpBinding>(),
|
||||
AuthModel.get().currentUid,
|
||||
type, it
|
||||
)
|
||||
ImageLoadUtils.loadRoundBackground(
|
||||
requireContext(),
|
||||
it.cpBackImg,
|
||||
binding.container,
|
||||
0,
|
||||
R.drawable.bg_cp_userinfo_card
|
||||
)
|
||||
}
|
||||
vm.loadingLiveData.observe(this) {
|
||||
if (it) dialogManager.showProgressDialog(requireContext())
|
||||
@@ -57,11 +65,8 @@ class UserInfoCpFragment : BaseViewBindingFragment<FragmentUserinfoCpBinding>(),
|
||||
FansListActivity.start(requireContext(), FansListActivity.TYPE_CP)
|
||||
}
|
||||
}
|
||||
R.id.mine_avatar -> {
|
||||
}
|
||||
|
||||
R.id.iv_invite -> {
|
||||
uid?.let { delegate.inviteCp(it)}
|
||||
uid?.let { delegate.inviteCp(it) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -6,7 +6,6 @@ import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.widget.FrameLayout
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import com.netease.nim.uikit.common.util.sys.ScreenUtil
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.databinding.LayoutCpCardBinding
|
||||
import com.yizhuan.erban.relation.extention.visibility
|
||||
@@ -38,10 +37,8 @@ class RelationCpCardView(context: Context, attr: AttributeSet?, def: Int) :
|
||||
var unbindRecoverVisibility = false
|
||||
var groupEmptyVisibility = false
|
||||
var declarationVisibility = false
|
||||
cpRelation?.let {
|
||||
binding.cpEntity = it
|
||||
setBackground(type, it)
|
||||
}
|
||||
binding.cpEntity = cpRelation
|
||||
setBackground(type, cpRelation)
|
||||
inviteData?.let { binding.inviteData = it }
|
||||
when (type) {
|
||||
PAGE_TYPE_SELF_CP -> {
|
||||
@@ -50,7 +47,7 @@ class RelationCpCardView(context: Context, attr: AttributeSet?, def: Int) :
|
||||
cpLevelVisibility = cpRelation.waitUnbound
|
||||
binding.tvCpTime.setTextColor(context.resources.getColor(R.color.white))
|
||||
unbindRecoverVisibility = cpRelation.waitUnbound
|
||||
unbindVisibility = (cpRelation.uid == selfUId) && !cpRelation.waitUnbound
|
||||
unbindVisibility = (cpRelation.unboundUid == selfUId) && !cpRelation.waitUnbound
|
||||
if (unbindRecoverVisibility && cpRelation.uid != selfUId) {
|
||||
binding.tvRecoveryUnbind.text = "关系解绑中"
|
||||
binding.tvRecoveryUnbind.isEnabled = false
|
||||
@@ -77,6 +74,7 @@ class RelationCpCardView(context: Context, attr: AttributeSet?, def: Int) :
|
||||
val centerHeartVisibility = userInfoVisibility
|
||||
val keepTimeVisibility = cpLevelVisibility
|
||||
|
||||
|
||||
binding.mineAvatar.visibility = userInfoVisibility.visibility()
|
||||
binding.tvMineName.visibility = userInfoVisibility.visibility()
|
||||
binding.ivCpHeart.visibility = centerHeartVisibility.visibility()
|
||||
@@ -89,21 +87,22 @@ class RelationCpCardView(context: Context, attr: AttributeSet?, def: Int) :
|
||||
binding.btnBind.visibility = groupEmptyVisibility.visibility()
|
||||
binding.ivInvite.visibility = groupEmptyVisibility.visibility()
|
||||
binding.tvDeclaration.visibility = declarationVisibility.visibility()
|
||||
binding.ivUnbind.visibility = unbindVisibility.visibility()
|
||||
binding.cpEntity = cpRelation
|
||||
|
||||
}
|
||||
|
||||
private fun setBackground(
|
||||
type: Int,
|
||||
it: CpRelation
|
||||
it: CpRelation?
|
||||
) {
|
||||
if (type != PAGE_TYPE_INVITE_DIALOG) {
|
||||
if (type == PAGE_TYPE_SELF_CP) {
|
||||
ImageLoadUtils.loadRoundBackground(
|
||||
context,
|
||||
it.cpBackImg,
|
||||
it?.cpBackImg,
|
||||
this,
|
||||
16,
|
||||
R.drawable.bg_corner_shadow_12
|
||||
R.drawable.bg_cp_card
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@@ -18,6 +18,7 @@ import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.AssistantAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.CarAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.CarveUpGoldThirdLevelAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.CpInviteAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.NobleAttachment;
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.VoiceBottleShakeHeartAttachment;
|
||||
@@ -42,6 +43,7 @@ public class MsgViewHolderText extends MsgViewHolderBase {
|
||||
private NobleAttachment mNobleAttachment;
|
||||
private CarAttachment mCarAttachment;
|
||||
private AssistantAttachment awardAttachment;
|
||||
private CpInviteAttachment cpInviteAttachment;
|
||||
|
||||
public MsgViewHolderText(BaseMultiItemFetchLoadAdapter adapter) {
|
||||
super(adapter);
|
||||
@@ -112,6 +114,9 @@ public class MsgViewHolderText extends MsgViewHolderBase {
|
||||
localExtension.put(VoiceBottleShakeHeartAttachment.KEY_VOICE_BOTTLE_NEED_SHAKE_HEART, false);
|
||||
message.setLocalExtension(localExtension);
|
||||
IMNetEaseManager.get().updateMessageToLocal(message);
|
||||
}else if(attachment instanceof CpInviteAttachment){
|
||||
cpInviteAttachment = (CpInviteAttachment)attachment;
|
||||
text = cpInviteAttachment.msg;
|
||||
}
|
||||
mTvMsg.setText(text);
|
||||
}
|
||||
@@ -139,6 +144,8 @@ public class MsgViewHolderText extends MsgViewHolderBase {
|
||||
}
|
||||
} else if (awardAttachment != null) {
|
||||
RouterHandler.handle(context, awardAttachment.routerType, awardAttachment.routerValue);
|
||||
}else if(cpInviteAttachment!=null){
|
||||
RouterHandler.handle(context, cpInviteAttachment.routerType, cpInviteAttachment.routerValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -198,6 +198,7 @@ public class ImageLoadUtils {
|
||||
}
|
||||
|
||||
public static void loadRoundBackground(Context context, String url, View view, int dp, @DrawableRes int defaultRes) {
|
||||
view.setBackgroundResource(defaultRes);
|
||||
if (StringUtil.isEmpty(url)) {
|
||||
return;
|
||||
}
|
||||
|
BIN
app/src/main/res/drawable-xhdpi/bg_cp_btn_visit_dialog.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/bg_cp_btn_visit_dialog.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.7 KiB |
BIN
app/src/main/res/drawable-xhdpi/bg_cp_dialog_global.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/bg_cp_dialog_global.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 47 KiB |
BIN
app/src/main/res/drawable-xhdpi/bg_cp_userinfo_card.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/bg_cp_userinfo_card.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 240 KiB |
BIN
app/src/main/res/drawable-xhdpi/bg_cp_userinfo_declaration.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/bg_cp_userinfo_declaration.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
BIN
app/src/main/res/drawable-xhdpi/ic_cp_close_dialog.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ic_cp_close_dialog.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 451 B |
@@ -2,11 +2,7 @@
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
|
||||
<item android:state_enabled="true">
|
||||
<shape android:shape="rectangle">
|
||||
<gradient android:angle="180" android:endColor="#FFAFC3" android:startColor="#FF696F" />
|
||||
<corners android:radius="@dimen/dp_4" />
|
||||
</shape>
|
||||
<item android:drawable="@drawable/bg_ff696f_ffafc3_cornor_4" android:state_enabled="true">
|
||||
</item>
|
||||
|
||||
<item android:state_enabled="false">
|
||||
|
9
app/src/main/res/drawable/bg_ff696f_ffafc3_cornor_4.xml
Normal file
9
app/src/main/res/drawable/bg_ff696f_ffafc3_cornor_4.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">
|
||||
<gradient
|
||||
android:angle="180"
|
||||
android:endColor="#FFAFC3"
|
||||
android:startColor="#FF696F" />
|
||||
<corners android:radius="@dimen/dp_4" />
|
||||
</shape>
|
111
app/src/main/res/layout/dialog_cp_global.xml
Normal file
111
app/src/main/res/layout/dialog_cp_global.xml
Normal file
@@ -0,0 +1,111 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:background="@drawable/bg_cp_dialog_global"
|
||||
android:layout_marginLeft="@dimen/dp_15"
|
||||
android:layout_marginRight="@dimen/dp_15"
|
||||
android:layout_height="80dp">
|
||||
|
||||
<com.yizhuan.erban.common.widget.CircleImageView
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:id="@+id/iv_avatar"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginLeft="@dimen/dp_8"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/space"
|
||||
/>
|
||||
|
||||
<Space
|
||||
android:id="@+id/space"
|
||||
android:layout_height="0dp"
|
||||
android:layout_width="0dp"
|
||||
app:layout_constraintLeft_toRightOf="@id/iv_avatar"
|
||||
android:layout_marginLeft="@dimen/dp_8"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/tv_nick"
|
||||
app:layout_constrainedWidth="true"
|
||||
android:layout_marginRight="@dimen/dp_20"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textColor="@color/color_333333"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_desc"
|
||||
app:layout_constraintLeft_toLeftOf="@id/space"
|
||||
tools:text="这就是大哥呀呀"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
app:layout_constraintRight_toLeftOf="@id/barrier_right"
|
||||
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/tv_desc"
|
||||
android:textSize="@dimen/sp_14"
|
||||
app:layout_constrainedWidth="true"
|
||||
android:textColor="@color/white"
|
||||
android:layout_marginRight="@dimen/dp_20"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_nick"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
app:layout_constraintLeft_toLeftOf="@id/space"
|
||||
tools:text="这就是大哥呀呀"
|
||||
app:layout_constraintRight_toLeftOf="@id/barrier_right"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="@dimen/dp_16"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
android:id="@+id/iv_close"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginRight="@dimen/dp_2"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:src="@drawable/ic_cp_close_dialog"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/tv_sec"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_12"
|
||||
tools:text="5s"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/iv_close"
|
||||
android:layout_marginRight="@dimen/dp_13"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:id="@+id/tv_visit"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginBottom="@dimen/dp_12"
|
||||
android:layout_marginRight="@dimen/dp_8"
|
||||
android:background="@drawable/bg_cp_btn_visit_dialog"
|
||||
/>
|
||||
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:id="@+id/barrier_right"
|
||||
app:barrierDirection="left"
|
||||
app:constraint_referenced_ids="tv_visit,tv_sec,iv_close"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
@@ -30,16 +30,16 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="619dp"
|
||||
android:background="@drawable/bg_cp_invite_dialog"
|
||||
android:paddingBottom="@dimen/dp_30"
|
||||
android:paddingBottom="@dimen/dp_50"
|
||||
app:layout_constraintHorizontal_weight="1"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_close">
|
||||
|
||||
<TextView
|
||||
android:layout_marginTop="80dp"
|
||||
android:id="@+id/tv_tip"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="70dp"
|
||||
android:layout_marginTop="80dp"
|
||||
android:layout_marginRight="55dp"
|
||||
android:gravity="center"
|
||||
android:lineSpacingMultiplier="1.2"
|
||||
@@ -113,11 +113,10 @@
|
||||
<TextView
|
||||
android:id="@+id/tv_send"
|
||||
android:layout_width="144dp"
|
||||
android:layout_height="@dimen/dp_28"
|
||||
android:layout_height="37dp"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:background="@drawable/bg_btn_invite_now"
|
||||
android:gravity="center"
|
||||
android:text="发送邀请"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
|
@@ -25,11 +25,11 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@{inviteData==null?@dimen/cp_card_normal:@dimen/cp_card_dialog,default=@dimen/cp_card_normal}"
|
||||
android:background="@drawable/bg_cp_card"
|
||||
android:paddingLeft="@dimen/dp_4"
|
||||
android:paddingTop="@dimen/dp_5"
|
||||
android:paddingRight="@dimen/dp_4"
|
||||
android:paddingBottom="@dimen/dp_5">
|
||||
android:paddingBottom="@dimen/dp_5"
|
||||
tools:background="@drawable/bg_cp_card">
|
||||
|
||||
|
||||
<com.yizhuan.erban.common.widget.CircleImageView
|
||||
@@ -37,33 +37,36 @@
|
||||
avatarUrl="@{inviteData==null?cpEntity.avatar:inviteData.inviteAvatar}"
|
||||
android:layout_width="@{inviteData==null?@dimen/cp_avatar_normal:@dimen/cp_avatar_dialog,default=@dimen/cp_avatar_normal}"
|
||||
android:layout_height="@{inviteData==null?@dimen/cp_avatar_normal:@dimen/cp_avatar_dialog,default=@dimen/cp_avatar_normal}"
|
||||
android:onClick="@{click}"
|
||||
android:visibility="gone"
|
||||
app:civ_border_color="@color/white"
|
||||
app:civ_border_width="1dp"
|
||||
android:onClick="@{click}"
|
||||
tools:layout_height="@dimen/dp_45"
|
||||
app:layout_constrainedHeight="true"
|
||||
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_mine_name"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tv_mine_name"
|
||||
app:layout_constraintRight_toRightOf="@id/tv_mine_name"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
tools:layout_height="@dimen/dp_45"
|
||||
tools:src="@mipmap/bg_me_top" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_mine_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_4"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:background="@drawable/bg_cp_text_perpule"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_horizontal"
|
||||
android:paddingLeft="@dimen/dp_6"
|
||||
android:paddingRight="@dimen/dp_6"
|
||||
android:layout_marginLeft="@dimen/dp_4"
|
||||
android:singleLine="true"
|
||||
android:text="@{inviteData==null?cpEntity.nick:inviteData.inviteNick}"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:gravity="center_horizontal"
|
||||
android:visibility="gone"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
@@ -76,6 +79,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_cp_heart"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_mine_name"
|
||||
app:layout_constraintLeft_toRightOf="@id/mine_avatar"
|
||||
app:layout_constraintRight_toLeftOf="@id/other_avatar"
|
||||
@@ -83,16 +87,16 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_level"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/dp_4"
|
||||
android:layout_marginBottom="@dimen/dp_8"
|
||||
android:background="@drawable/bg_cp_level"
|
||||
android:gravity="center"
|
||||
android:text="@{@string/cp_level(String.valueOf(cpEntity.cpLevel))}"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:layout_marginRight="@dimen/dp_4"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@id/iv_cp_heart"
|
||||
app:layout_constraintLeft_toLeftOf="@id/iv_cp_heart"
|
||||
app:layout_constraintRight_toRightOf="@id/iv_cp_heart"
|
||||
@@ -102,16 +106,16 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_cp_time"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@{@string/cp_duration(String.valueOf(cpEntity.cpKeepDuration))}"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_10"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_mine_name"
|
||||
app:layout_constraintLeft_toLeftOf="@id/iv_cp_heart"
|
||||
app:layout_constraintRight_toRightOf="@id/iv_cp_heart"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_mine_name"
|
||||
tools:text="已陪伴8888个小时" />
|
||||
|
||||
<com.yizhuan.erban.common.widget.CircleImageView
|
||||
@@ -119,13 +123,14 @@
|
||||
avatarUrl="@{inviteData==null?cpEntity.cpAvatar:inviteData.acceptAvatar}"
|
||||
android:layout_width="@{inviteData==null?@dimen/cp_avatar_normal:@dimen/cp_avatar_dialog,default=@dimen/cp_avatar_normal}"
|
||||
android:layout_height="@{inviteData==null?@dimen/cp_avatar_normal:@dimen/cp_avatar_dialog,default=@dimen/cp_avatar_normal}"
|
||||
android:onClick="@{click}"
|
||||
android:src="@drawable/ic_cp_invite"
|
||||
android:visibility="gone"
|
||||
app:civ_border_color="@color/white"
|
||||
app:civ_border_width="1dp"
|
||||
android:onClick="@{click}"
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_other_name"
|
||||
app:layout_constraintRight_toRightOf="@id/tv_other_name"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tv_other_name"
|
||||
app:layout_constraintRight_toRightOf="@id/tv_other_name"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_chainStyle="packed"
|
||||
tools:src="@mipmap/bg_me_top" />
|
||||
@@ -143,6 +148,7 @@
|
||||
android:text="@{inviteData==null?(cpEntity.cpUid==0?@string/invite_cp:cpEntity.cpNick):inviteData.acceptNick}"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:visibility="gone"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/iv_cp_heart"
|
||||
@@ -155,15 +161,15 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="26dp"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:background="@drawable/bg_cp_pink_selector"
|
||||
android:background="@drawable/bg_ff696f_ffafc3_cornor_4"
|
||||
android:gravity="center"
|
||||
android:onClick="@{click}"
|
||||
android:paddingLeft="@dimen/dp_8"
|
||||
android:paddingRight="@dimen/dp_8"
|
||||
android:text="撤销解除关系"
|
||||
android:visibility="gone"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="@id/iv_cp_heart"
|
||||
app:layout_constraintRight_toRightOf="@id/iv_cp_heart"
|
||||
@@ -174,8 +180,8 @@
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:onClick="@{click}"
|
||||
android:visibility="gone"
|
||||
android:src="@drawable/ic_cp_invite"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
@@ -202,8 +208,8 @@
|
||||
android:background="@drawable/bg_cp_text_perpule"
|
||||
android:gravity="center"
|
||||
android:text="绑定CP"
|
||||
android:visibility="gone"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_invite" />
|
||||
@@ -214,16 +220,30 @@
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginLeft="@dimen/dp_5"
|
||||
android:layout_marginTop="@dimen/dp_27"
|
||||
android:layout_marginRight="@dimen/dp_5"
|
||||
android:background="@drawable/bg_cp_userinfo_declaration"
|
||||
android:ellipsize="end"
|
||||
android:paddingLeft="@dimen/dp_8"
|
||||
android:paddingRight="@dimen/dp_8"
|
||||
android:singleLine="true"
|
||||
android:visibility="gone"
|
||||
android:text="@{cpEntity.declaration}"
|
||||
android:textColor="#9B8AFF"
|
||||
android:textSize="@dimen/sp_13"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_mine_name" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_unbind"
|
||||
android:layout_width="@dimen/dp_30"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginRight="@dimen/dp_7"
|
||||
android:onClick="@{click}"
|
||||
android:src="@drawable/nim_ic_menu_normal"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
@@ -221,5 +221,5 @@
|
||||
<dimen name="cp_avatar_normal">56dp</dimen>
|
||||
<dimen name="cp_avatar_dialog">44dp</dimen>
|
||||
<dimen name="cp_card_dialog">80dp</dimen>
|
||||
<dimen name="cp_card_normal">148dp</dimen>
|
||||
<dimen name="cp_card_normal">160dp</dimen>
|
||||
</resources>
|
||||
|
@@ -932,4 +932,6 @@
|
||||
<string name="invite_cp_state_unbinding">解绑中</string>
|
||||
<string name="invite_cp_state_unbound">已解绑</string>
|
||||
<string name="invite_cp_state_visit">查看</string>
|
||||
<string name="cp_unbind_tip">解除后,包括陪伴时长、等级都会清除;确定解除关系吗?</string>
|
||||
<string name="cp_revert_tip">撤销后,包括陪伴时长及等级都会回复,确定恢复关系吗?</string>
|
||||
</resources>
|
||||
|
@@ -0,0 +1,47 @@
|
||||
package com.yizhuan.xchat_android_core.im.custom.bean;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
public class CpInviteAttachment extends CustomAttachment {
|
||||
|
||||
public String msg;
|
||||
public int routerType;
|
||||
public String routerValue;
|
||||
public String title;
|
||||
public int mSecond;
|
||||
|
||||
public CpInviteAttachment(int second) {
|
||||
super(CustomAttachment.CP_INVITE_MESSAGE, second);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void parseData(JSONObject data) {
|
||||
super.parseData(data);
|
||||
super.parseData(data);
|
||||
if (data != null) {
|
||||
if (data.containsKey("msg")) {
|
||||
msg = data.getString("msg");
|
||||
}
|
||||
if (data.containsKey("routerType")) {
|
||||
routerType = data.getInteger("routerType");
|
||||
}
|
||||
if (data.containsKey("propInfo")) {
|
||||
routerValue = data.getString("propInfo");
|
||||
}
|
||||
if (data.containsKey("title")) {
|
||||
title = data.getString("title");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected JSONObject packData() {
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("routerType", routerType);
|
||||
jsonObject.put("msg", msg);
|
||||
jsonObject.put("propInfo", routerValue);
|
||||
jsonObject.put("title", title);
|
||||
return jsonObject;
|
||||
}
|
||||
}
|
@@ -556,6 +556,10 @@ public class CustomAttachParser implements MsgAttachmentParser {
|
||||
case CustomAttachment.ANCHOR_ROOM_AUDIENCE_UPMIC:
|
||||
attachment = new RequestUpmicAttachment(CustomAttachment.ANCHOR_ROOM_AUDIENCE_UPMIC, 0);
|
||||
break;
|
||||
|
||||
case CustomAttachment.CP_INVITE_MESSAGE:
|
||||
attachment = new CpInviteAttachment(CustomAttachment.CP_INVITE_MESSAGE_TOP_NOTICE);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@@ -12,7 +12,9 @@ import com.yizhuan.xchat_android_core.noble.NobleInfo;
|
||||
* @date 2017/6/8
|
||||
*/
|
||||
public class CustomAttachment implements MsgAttachment {
|
||||
/** 自定义消息附件的类型,根据该字段区分不同的自定义消息 */
|
||||
/**
|
||||
* 自定义消息附件的类型,根据该字段区分不同的自定义消息
|
||||
*/
|
||||
protected int first;
|
||||
protected int second;
|
||||
protected JSONObject data;
|
||||
@@ -64,9 +66,13 @@ public class CustomAttachment implements MsgAttachment {
|
||||
|
||||
// 贵族
|
||||
public static final int CUSTOM_MESS_HEAD_NOBLE = 14;
|
||||
/** 靓号未生效提醒 */
|
||||
/**
|
||||
* 靓号未生效提醒
|
||||
*/
|
||||
public static final int CUSTOM_MSG_HEADER_TYPE_GOOD_NUMBER_INACTIVE = 147;
|
||||
/** 贵族快到期(前三天)消息 */
|
||||
/**
|
||||
* 贵族快到期(前三天)消息
|
||||
*/
|
||||
public static final int CUSTOM_MSG_HEADER_TYPE_NOBLE_END = 144;
|
||||
|
||||
// 开通贵族
|
||||
@@ -82,7 +88,9 @@ public class CustomAttachment implements MsgAttachment {
|
||||
// 推荐房间
|
||||
public static final int CUSTOM_MESS_SUB_RECOM_ROOM = 149;
|
||||
|
||||
/** 进场横幅 (客户端定义) */
|
||||
/**
|
||||
* 进场横幅 (客户端定义)
|
||||
*/
|
||||
public static final int CUSTOM_MESS_SUB_ROOM_WELCOME = 141;
|
||||
|
||||
// 座驾
|
||||
@@ -113,14 +121,14 @@ public class CustomAttachment implements MsgAttachment {
|
||||
public static final int CUSTOM_MSG_ASSISTANT_MSG = 19;
|
||||
// 小秘书通用消息
|
||||
public static final int CUSTOM_MSG_ASSISTANT_COMMON_MSG = 191;
|
||||
|
||||
|
||||
// 房间信息更新
|
||||
public static final int CUSTOM_MSG_UPDATE_ROOM_INFO=20;
|
||||
public static final int CUSTOM_MSG_UPDATE_ROOM_INFO_GIFT=201;
|
||||
public static final int CUSTOM_MSG_UPDATE_ROOM_INFO_AUDIO=202;
|
||||
public static final int CUSTOM_MSG_UPDATE_ROOM_INFO_CLOSE_SCREEN=203;
|
||||
public static final int CUSTOM_MSG_UPDATE_ROOM_INFO = 20;
|
||||
public static final int CUSTOM_MSG_UPDATE_ROOM_INFO_GIFT = 201;
|
||||
public static final int CUSTOM_MSG_UPDATE_ROOM_INFO_AUDIO = 202;
|
||||
public static final int CUSTOM_MSG_UPDATE_ROOM_INFO_CLOSE_SCREEN = 203;
|
||||
public static final int CUSTOM_MSG_UPDATE_ROOM_INFO_NOTICE = 204; // 通用公屏提示文案,使用于各种模式的开和关
|
||||
public static final int CUSTOM_MSG_UPDATE_ROOM_INFO_CLOSE_REDPACKAGE=205;
|
||||
public static final int CUSTOM_MSG_UPDATE_ROOM_INFO_CLOSE_REDPACKAGE = 205;
|
||||
|
||||
// 群红包
|
||||
public static final int CUSTOM_MSG_HEADER_TYPE_LUCKY_MONEY = 21;
|
||||
@@ -140,16 +148,16 @@ public class CustomAttachment implements MsgAttachment {
|
||||
public static final int CUSTOM_MSG_SUB_TYPE_COMMON_SYSTEM_MSG_APPROVAL = 232;
|
||||
|
||||
//等级提升弹窗
|
||||
public static final int CUSTOM_MSG_LEVEL_UP=24;
|
||||
public static final int CUSTOM_MSG_EXPER_LEVEL_UP=241;
|
||||
public static final int CUSTOM_MSG_CHARM_LEVEL_UP=242;
|
||||
public static final int CUSTOM_MSG_EXPER_LEVEL_UP_NOTICE=243;
|
||||
public static final int CUSTOM_MSG_LEVEL_UP = 24;
|
||||
public static final int CUSTOM_MSG_EXPER_LEVEL_UP = 241;
|
||||
public static final int CUSTOM_MSG_CHARM_LEVEL_UP = 242;
|
||||
public static final int CUSTOM_MSG_EXPER_LEVEL_UP_NOTICE = 243;
|
||||
//龙珠游戏
|
||||
public static final int CUSTOM_MSG_DRAGON_BAR=25;
|
||||
public static final int CUSTOM_MSG_DRAGON_BAR_START=251;
|
||||
public static final int CUSTOM_MSG_DRAGON_BAR_END=252;
|
||||
public static final int CUSTOM_MSG_DRAGON_BAR_CANCEL=253;
|
||||
public static final int CUSTOM_MSG_DRAGON_BAR_RUNAWAY=254;
|
||||
public static final int CUSTOM_MSG_DRAGON_BAR = 25;
|
||||
public static final int CUSTOM_MSG_DRAGON_BAR_START = 251;
|
||||
public static final int CUSTOM_MSG_DRAGON_BAR_END = 252;
|
||||
public static final int CUSTOM_MSG_DRAGON_BAR_CANCEL = 253;
|
||||
public static final int CUSTOM_MSG_DRAGON_BAR_RUNAWAY = 254;
|
||||
//房间开宝箱
|
||||
public static final int CUSTOM_MSG_BOX = 26;
|
||||
public static final int CUSTOM_MSG_SUB_BOX_ME = 261;//自己可见
|
||||
@@ -186,7 +194,7 @@ public class CustomAttachment implements MsgAttachment {
|
||||
public static final int CUSTOM_MSG_QUEUING_MIC = 30;
|
||||
public static final int CUSTOM_MSG_SUB_QUEUING_MIC_NON_EMPTY = 301; // 从无人排麦到有人排麦
|
||||
public static final int CUSTOM_MSG_SUB_QUEUING_MIC_EMPTY = 302; // 从有人排麦到无人排麦
|
||||
public static final int CUSTOM_MSG_SUB_QUEUING_MIC_MODE_OPEN = 303; // 开启排麦模式
|
||||
public static final int CUSTOM_MSG_SUB_QUEUING_MIC_MODE_OPEN = 303; // 开启排麦模式
|
||||
public static final int CUSTOM_MSG_SUB_QUEUING_MIC_MODE_CLOSE = 304; // 关闭排麦模式
|
||||
public static final int CUSTOM_MSG_SUB_QUEUING_MIC_FREE_MIC_OPEN = 305; // 将坑位设置成自由麦
|
||||
public static final int CUSTOM_MSG_SUB_QUEUING_MIC_FREE_MIC_CLOSE = 306; // 将坑位设置成排麦
|
||||
@@ -426,6 +434,10 @@ public class CustomAttachment implements MsgAttachment {
|
||||
///个播房观众点击空坑位,房主收到请求上麦提示
|
||||
public static final int ANCHOR_ROOM_AUDIENCE_UPMIC = 86;
|
||||
|
||||
|
||||
public static final int CP_INVITE_MESSAGE = 88;
|
||||
public static final int CP_INVITE_MESSAGE_TOP_NOTICE = 881;
|
||||
|
||||
public CustomAttachment() {
|
||||
|
||||
}
|
||||
|
@@ -201,13 +201,13 @@ public class RouterType {
|
||||
/**
|
||||
* Cp邀请
|
||||
*/
|
||||
public static final int CP_INVITE = 62;
|
||||
public static final int CP_INVITE = 61;
|
||||
|
||||
/**
|
||||
* Cp关系任务
|
||||
*/
|
||||
|
||||
public static final int CP_TASK = 61;
|
||||
public static final int CP_TASK = 62;
|
||||
|
||||
/**
|
||||
* CP头饰
|
||||
|
@@ -0,0 +1,18 @@
|
||||
package com.yizhuan.xchat_android_core.relation.cp
|
||||
|
||||
data class CpInviteMessageEntity(
|
||||
val replyExpireTime: String,
|
||||
val inviteUid: Long,
|
||||
val inviteAvatar: String,
|
||||
val inviteNick: String,
|
||||
val inviteGender: Int,
|
||||
val acceptUid: Long,
|
||||
val acceptAvatar: String,
|
||||
val acceptNick: String,
|
||||
val acceptGender: Int,
|
||||
val propsId: Int,
|
||||
val propsName: String,
|
||||
val propsImg: String,
|
||||
val propsPrice: Double,
|
||||
val recommenTxt: List<String>,
|
||||
)
|
@@ -7,7 +7,7 @@ data class CpRelation(
|
||||
val cpId: Long,// cp记录id
|
||||
//邀请人
|
||||
val uid: Long,//邀请人uid
|
||||
val nick: Long,//邀请人
|
||||
val nick: String,//邀请人
|
||||
val gender: Int,//1-男2-女 //邀请人
|
||||
val avatar: String,//邀请人
|
||||
//被邀请人
|
||||
@@ -22,5 +22,5 @@ data class CpRelation(
|
||||
val cpKeepDuration: String,
|
||||
val cpBackImg: String,
|
||||
val waitUnbound: Boolean,//CP状态 true 解绑中
|
||||
val unBoundUid: Long//解绑发起人UID
|
||||
val unboundUid: Long//解绑发起人UID
|
||||
)
|
Reference in New Issue
Block a user