feat:完善发送红包的权限细分
feat:删除红包无用旧代码
This commit is contained in:
@@ -341,7 +341,7 @@ public class RoomOperationDialog extends BottomSheetDialog {
|
||||
* @param optAdapter
|
||||
*/
|
||||
private void addRedPacketAction(OptAdapter optAdapter) {
|
||||
if (AvRoomDataManager.get().isRedEnvelopeOpen()) {
|
||||
if (AvRoomDataManager.get().getRedEnvelopeType() > 0) {
|
||||
RoomInfo roomInfo = AvRoomDataManager.get().mCurrentRoomInfo;
|
||||
if (roomInfo == null) {
|
||||
return;
|
||||
|
@@ -49,7 +49,7 @@ import com.yizhuan.erban.avroom.dialog.RoomFreeGiftDialog
|
||||
import com.yizhuan.erban.avroom.dialog.RoomOperationDialog
|
||||
import com.yizhuan.erban.avroom.firstcharge.FirstChargeDialog
|
||||
import com.yizhuan.erban.avroom.presenter.BaseRoomPresenter
|
||||
import com.yizhuan.erban.avroom.redpackage.send.RedPackageSendDialog2
|
||||
import com.yizhuan.erban.avroom.redpackage.send.RedPackageSendDialog
|
||||
import com.yizhuan.erban.avroom.room_album.RoomAlbumModel
|
||||
import com.yizhuan.erban.avroom.view.IBaseRoomView
|
||||
import com.yizhuan.erban.avroom.widget.BottomView
|
||||
@@ -170,7 +170,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
* 是否開啟禮物值顯示
|
||||
*/
|
||||
private var showGiftValue = false
|
||||
private var redPackageSendDialog: RedPackageSendDialog2? = null
|
||||
private var redPackageSendDialog: RedPackageSendDialog? = null
|
||||
private val mOnSoftKeyBoardChangeListener: OnSoftKeyBoardChangeListener =
|
||||
object : OnSoftKeyBoardChangeListener {
|
||||
override fun keyBoardShow(height: Int) {
|
||||
@@ -1298,7 +1298,7 @@ open class BaseRoomFragment<V : IBaseRoomView?, P : BaseRoomPresenter<V>?> :
|
||||
override fun onMoreBtnClick() {
|
||||
val dialog = RoomOperationDialog(mContext)
|
||||
dialog.setOnActionListener {
|
||||
redPackageSendDialog = RedPackageSendDialog2()
|
||||
redPackageSendDialog = RedPackageSendDialog.newInstance(AvRoomDataManager.get().redEnvelopeType)
|
||||
redPackageSendDialog?.setOnDismissListener {
|
||||
redPackageSendDialog = null
|
||||
}
|
||||
|
@@ -1,20 +0,0 @@
|
||||
package com.yizhuan.erban.avroom.redpackage
|
||||
|
||||
import android.widget.TextView
|
||||
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.ImageLoadUtils
|
||||
import com.yizhuan.xchat_android_core.redpackage.RedEnvelopeGiftItemVO
|
||||
|
||||
class RedPackageGiftAdapter(layoutId: Int = R.layout.item_red_package_gift) :
|
||||
BaseQuickAdapter<RedEnvelopeGiftItemVO, BaseViewHolder>(layoutId) {
|
||||
|
||||
override fun convert(helper: BaseViewHolder, item: RedEnvelopeGiftItemVO) {
|
||||
ImageLoadUtils.loadAvatar(mContext, item.giftVo?.giftUrl, helper.getView(R.id.iv_gift))
|
||||
helper.setText(R.id.tv_gift_num, "x${item.giftNum}")
|
||||
helper.getView<TextView>(R.id.tv_gift_name)?.let {
|
||||
it.text = item.giftVo?.giftName
|
||||
}
|
||||
}
|
||||
}
|
@@ -4,9 +4,8 @@ import android.content.Context
|
||||
import androidx.lifecycle.Lifecycle
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.yizhuan.erban.application.XChatApplication
|
||||
import com.yizhuan.erban.avroom.activity.AVRoomActivity
|
||||
import com.yizhuan.erban.avroom.redpackage.open.RedPackageOpenDialog2
|
||||
import com.yizhuan.erban.avroom.redpackage.open.RedPackageOpenDialog
|
||||
import com.yizhuan.xchat_android_core.im.custom.bean.RedPackageAttachment
|
||||
import com.yizhuan.xchat_android_core.manager.IMNetEaseManager
|
||||
import com.yizhuan.xchat_android_core.manager.RoomEvent
|
||||
@@ -54,7 +53,7 @@ class RedPackageHandler : RoomHandler() {
|
||||
.subscribe({ item ->
|
||||
if (item.state != 3 && item.state != 6 && item.state != 4) {
|
||||
roomView?.getActivity().let {
|
||||
RedPackageOpenDialog2.newInstance(item).show(it)
|
||||
RedPackageOpenDialog.newInstance(item).show(it)
|
||||
}
|
||||
}
|
||||
}, {})
|
||||
@@ -125,7 +124,7 @@ class RedPackageHandler : RoomHandler() {
|
||||
}
|
||||
if (data.kind == 0 || (data.kind == 1 && data.validityType == 0)) {
|
||||
//【旧版本-厅内红包:kind=0】、【新版本-厅内无门槛-立即生效红包:kind=1&validityType=0】
|
||||
RedPackageOpenDialog2.newInstance(data).show(activity)
|
||||
RedPackageOpenDialog.newInstance(data).show(activity)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,7 +150,7 @@ class RedPackageHandler : RoomHandler() {
|
||||
fun onAllServiceSignaling(context: Context, data: RedPackageNotifyInfo) {
|
||||
if (context is AVRoomActivity) {
|
||||
if (roomContext?.roomId == data.roomUid) {
|
||||
RedPackageOpenDialog2.newInstance(data).show(context)
|
||||
RedPackageOpenDialog.newInstance(data).show(context)
|
||||
} else {
|
||||
if (!inOperation) {
|
||||
RedPackageGoRoomDialog.newInstance(data).show(context)
|
||||
|
@@ -1,40 +0,0 @@
|
||||
package com.yizhuan.erban.avroom.redpackage
|
||||
|
||||
import android.graphics.Color
|
||||
import android.view.View
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
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.ImageLoadUtils
|
||||
import com.yizhuan.erban.utils.UserUtils
|
||||
import com.yizhuan.xchat_android_core.redpackage.RedEnvelopeItemVO
|
||||
import com.yizhuan.xchat_android_core.utils.subAndReplaceDot
|
||||
import com.yizhuan.xchat_android_library.utils.ResUtil
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
|
||||
class RedPackageOpenAdapter : BaseQuickAdapter<RedEnvelopeItemVO, BaseViewHolder>(R.layout.item_red_package_diamond) {
|
||||
private val dateFormat = SimpleDateFormat(ResUtil.getString(R.string.avroom_redpackage_redpackageopenadapter_01), Locale.CHINA)
|
||||
override fun convert(helper: BaseViewHolder, item: RedEnvelopeItemVO) {
|
||||
ImageLoadUtils.loadAvatar(mContext, item.userVO.avatar, helper.getView(R.id.iv_avatar))
|
||||
val isSelf = item.userVO.uid == UserUtils.getUserUid()
|
||||
helper.setText(R.id.tv_nickname, if (isSelf) ResUtil.getString(R.string.avroom_redpackage_redpackageopenadapter_02) else item.userVO.nick.subAndReplaceDot(6))
|
||||
.setTextColor(R.id.tv_nickname, Color.parseColor(if (isSelf) "#FDCD00" else "#FFFFFF"))
|
||||
.setText(R.id.tv_time, dateFormat.format(item.createTime))
|
||||
.setText(R.id.tv_diamond_num, item.amount.substringBefore("."))
|
||||
|
||||
item.redEnvelopeGiftItemVOs?.let {
|
||||
if (it.isNotEmpty()) {
|
||||
helper.setGone(R.id.tv_diamond_num, false)
|
||||
val rvGift = helper.getView<RecyclerView>(R.id.rv_gift)
|
||||
val adapter = RedPackageGiftAdapter()
|
||||
rvGift.visibility = View.VISIBLE
|
||||
rvGift.layoutManager = LinearLayoutManager(mContext, RecyclerView.HORIZONTAL, false)
|
||||
rvGift.adapter = adapter
|
||||
adapter.setNewData(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,202 +0,0 @@
|
||||
package com.yizhuan.erban.avroom.redpackage
|
||||
|
||||
|
||||
import android.animation.Animator
|
||||
import android.animation.AnimatorListenerAdapter
|
||||
import android.animation.ObjectAnimator
|
||||
import android.annotation.SuppressLint
|
||||
import android.graphics.Color
|
||||
import android.os.Bundle
|
||||
import android.text.style.ForegroundColorSpan
|
||||
import android.view.View
|
||||
import android.view.WindowManager
|
||||
import android.view.animation.AccelerateDecelerateInterpolator
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.avroom.widget.MessageView
|
||||
import com.yizhuan.erban.base.BaseDialog
|
||||
import com.yizhuan.erban.databinding.DialogRedPackageOpenBinding
|
||||
import com.yizhuan.erban.ui.utils.ImageLoadUtils
|
||||
import com.yizhuan.erban.utils.UserUtils
|
||||
import com.yizhuan.xchat_android_core.DemoCache
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel
|
||||
import com.yizhuan.xchat_android_core.home.event.FollowRoomEvent
|
||||
import com.yizhuan.xchat_android_core.home.model.CollectionRoomModel
|
||||
import com.yizhuan.xchat_android_core.manager.AvRoomDataManager
|
||||
import com.yizhuan.xchat_android_core.pay.PayModel
|
||||
import com.yizhuan.xchat_android_core.redpackage.*
|
||||
import com.yizhuan.xchat_android_core.redpackage.RedEnvelopeState.Companion.REMAIN_ZERO
|
||||
import com.yizhuan.xchat_android_core.redpackage.RedEnvelopeState.Companion.SUCCESS
|
||||
import com.yizhuan.xchat_android_core.redpackage.RedEnvelopeState.Companion.TIME_OUT
|
||||
import com.yizhuan.xchat_android_core.redpackage.RedEnvelopeState.Companion.TIME_OUT_BACK
|
||||
import com.yizhuan.xchat_android_library.utils.ResUtil
|
||||
import com.yizhuan.xchat_android_library.utils.SingleToastUtil
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
|
||||
class RedPackageOpenDialog : BaseDialog<DialogRedPackageOpenBinding>() {
|
||||
|
||||
private var mObjectAnimator: ObjectAnimator? = null
|
||||
|
||||
private val redPackageNotifyInfo by lazy { arguments?.getSerializable(KEY_NOTIFY_INFO) as RedPackageNotifyInfo }
|
||||
|
||||
private var isOpened = false
|
||||
private var redPackageInfo: RedPackageInfo? = null
|
||||
|
||||
companion object {
|
||||
private const val KEY_NOTIFY_INFO = "redPackageNotifyInfo"
|
||||
fun newInstance(redPackageNotifyInfo: RedPackageNotifyInfo): RedPackageOpenDialog {
|
||||
return RedPackageOpenDialog().apply {
|
||||
arguments = Bundle().apply {
|
||||
putSerializable(KEY_NOTIFY_INFO, redPackageNotifyInfo)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onStart() {
|
||||
width = WindowManager.LayoutParams.MATCH_PARENT
|
||||
height = WindowManager.LayoutParams.WRAP_CONTENT
|
||||
super.onStart()
|
||||
}
|
||||
|
||||
override fun init() {
|
||||
dialog?.setCanceledOnTouchOutside(false)
|
||||
binding?.ivClose?.setOnClickListener { dismissAllowingStateLoss() }
|
||||
binding?.ivOpen?.setOnClickListener {
|
||||
startRedPacketAnim(it)
|
||||
it.isEnabled = false
|
||||
}
|
||||
redPackageNotifyInfo.let {
|
||||
ImageLoadUtils.loadAvatar(context, it.sendUserAvatar, binding?.ivAvatar)
|
||||
binding?.tvContent?.text = it.redEnvelopeMessage
|
||||
binding?.tvNickname?.text = it.sendUserNick
|
||||
}
|
||||
// StatUtil.onEvent("openhongbao", ResUtil.getString(R.string.avroom_redpackage_redpackageopendialog_01))
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
private fun startRedPacketAnim(v: View) {
|
||||
RedPackageModel.openRedPackage(redPackageNotifyInfo.redEnvelopeId.toLong())
|
||||
.subscribe({
|
||||
redPackageInfo = it
|
||||
if (mObjectAnimator?.isRunning == false) {
|
||||
openRedPackage()
|
||||
}
|
||||
}, {
|
||||
binding?.ivOpen?.isEnabled = true
|
||||
mObjectAnimator?.cancel()
|
||||
SingleToastUtil.showToast(it.message)
|
||||
})
|
||||
|
||||
mObjectAnimator = ObjectAnimator.ofFloat(v, "rotationY", 0f, 360f)
|
||||
mObjectAnimator?.let {
|
||||
it.duration = 1500
|
||||
it.interpolator = AccelerateDecelerateInterpolator()
|
||||
it.addListener(object : AnimatorListenerAdapter() {
|
||||
|
||||
var isCanceled = false
|
||||
override fun onAnimationCancel(animation: Animator) {
|
||||
isCanceled = true
|
||||
}
|
||||
|
||||
override fun onAnimationEnd(animation: Animator) {
|
||||
if (!isCanceled) {
|
||||
openRedPackage()
|
||||
}
|
||||
}
|
||||
})
|
||||
it.start()
|
||||
}
|
||||
// StatUtil.onEvent("openhongbao_open", ResUtil.getString(R.string.avroom_redpackage_redpackageopendialog_02))
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
private fun openRedPackage() {
|
||||
if (isOpened) return
|
||||
redPackageInfo?.let { packageInfo ->
|
||||
isOpened = true
|
||||
binding?.clOpened?.visibility = View.VISIBLE
|
||||
binding?.clRed?.visibility = View.GONE
|
||||
binding?.tvNicknameOpened?.text = redPackageNotifyInfo.sendUserNick
|
||||
ImageLoadUtils.loadAvatar(
|
||||
context,
|
||||
redPackageNotifyInfo.sendUserAvatar,
|
||||
binding?.ivAvatarOpened
|
||||
)
|
||||
packageInfo.redEnvelopeVO?.apply {
|
||||
binding?.tvContentOpened?.text = message
|
||||
when (packageInfo.redEnvelopeState) {
|
||||
SUCCESS -> {
|
||||
packageInfo.redEnvelopeItemVOs?.firstOrNull { item -> item.userVO.uid == UserUtils.getUserUid() }
|
||||
?.let {
|
||||
it.redEnvelopeGiftItemVOs?.apply {
|
||||
if (!isEmpty()) {
|
||||
val adapter =
|
||||
RedPackageGiftAdapter(R.layout.item_red_package_gift_top)
|
||||
binding?.rvGift?.visibility = View.VISIBLE
|
||||
binding?.tvDiamondNum?.visibility = View.GONE
|
||||
binding?.rvGift?.layoutManager = LinearLayoutManager(
|
||||
context,
|
||||
RecyclerView.HORIZONTAL,
|
||||
false
|
||||
)
|
||||
binding?.rvGift?.adapter = adapter
|
||||
adapter.setNewData(this)
|
||||
binding?.tvTips?.setTextColor(Color.WHITE)
|
||||
binding?.tvTips?.text =
|
||||
MessageView.SpannableBuilder(binding?.tvTips)
|
||||
.append(ResUtil.getString(R.string.avroom_redpackage_redpackageopendialog_03))
|
||||
.append(
|
||||
it.amount,
|
||||
ForegroundColorSpan(Color.parseColor("#FDCD00"))
|
||||
)
|
||||
.append(ResUtil.getString(R.string.avroom_redpackage_redpackageopendialog_04))
|
||||
.build()
|
||||
}
|
||||
}
|
||||
binding?.tvDiamondNum?.text = it.amount.substringBefore(".")
|
||||
}
|
||||
if (!AvRoomDataManager.get().isRoomFans) {
|
||||
AvRoomDataManager.get().roomUid.let {
|
||||
CollectionRoomModel.get().followRoom("1", it)
|
||||
.subscribe { _: String? ->
|
||||
AvRoomDataManager.get().isRoomFans = true
|
||||
EventBus.getDefault().post(FollowRoomEvent())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TIME_OUT, REMAIN_ZERO, TIME_OUT_BACK -> {
|
||||
binding?.clOpened?.setBackgroundResource(R.drawable.room_red_package_get_bg)
|
||||
binding?.tvDiamondNum?.visibility = View.GONE
|
||||
binding?.tvTips?.visibility = View.GONE
|
||||
binding?.tvNoGet?.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
binding?.tvRedNum?.text = "已領取${pickNum}/${totalNum}個"
|
||||
if (type == ALL_GIFT || type == ALL_DIAMOND) {
|
||||
DemoCache.saveRedPackage(id)
|
||||
}
|
||||
}
|
||||
val adapter = RedPackageOpenAdapter()
|
||||
binding?.rvUsers?.adapter = adapter
|
||||
binding?.rvUsers?.layoutManager = LinearLayoutManager(context)
|
||||
adapter.setNewData(packageInfo.redEnvelopeItemVOs)
|
||||
PayModel.get().getWalletInfo(AuthModel.get().currentUid).subscribe()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
mObjectAnimator?.cancel()
|
||||
mObjectAnimator = null
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
super.onPause()
|
||||
dismissAllowingStateLoss()
|
||||
}
|
||||
|
||||
}
|
@@ -1,276 +0,0 @@
|
||||
package com.yizhuan.erban.avroom.redpackage
|
||||
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.graphics.Paint
|
||||
import android.text.Editable
|
||||
import android.text.TextWatcher
|
||||
import android.view.KeyEvent
|
||||
import android.view.View
|
||||
import android.view.WindowManager
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.base.BaseDialog
|
||||
import com.yizhuan.erban.common.widget.dialog.DialogManager
|
||||
import com.yizhuan.erban.databinding.DialogRedPackageSendBinding
|
||||
import com.yizhuan.erban.pay.password.GiveGoldPassWordFragment
|
||||
import com.yizhuan.erban.pay.widget.GridPasswordNoFocusView
|
||||
import com.yizhuan.erban.ui.pay.ChargeActivity
|
||||
import com.yizhuan.erban.ui.setting.ModifyPwdActivity
|
||||
import com.yizhuan.erban.ui.webview.CommonWebViewActivity
|
||||
import com.yizhuan.erban.ui.webview.DialogWebViewActivity
|
||||
import com.yizhuan.xchat_android_core.Constants
|
||||
import com.yizhuan.xchat_android_core.UriProvider
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel
|
||||
import com.yizhuan.xchat_android_core.initial.InitialModel
|
||||
import com.yizhuan.xchat_android_core.initial.bean.InitInfo
|
||||
import com.yizhuan.xchat_android_core.manager.AvRoomDataManager
|
||||
import com.yizhuan.xchat_android_core.pay.PayModel
|
||||
import com.yizhuan.xchat_android_core.pay.event.UpdateWalletInfoEvent
|
||||
import com.yizhuan.xchat_android_core.redpackage.*
|
||||
import com.yizhuan.xchat_android_core.user.UserModel
|
||||
import com.yizhuan.xchat_android_core.utils.LogUtils
|
||||
import com.yizhuan.xchat_android_core.utils.toIntOrDef
|
||||
import com.yizhuan.xchat_android_library.annatation.ActLayoutRes
|
||||
import com.yizhuan.xchat_android_library.common.util.DeviceUtil
|
||||
import com.yizhuan.xchat_android_library.utils.AppMetaDataUtil
|
||||
import com.yizhuan.xchat_android_library.utils.CommonUtils
|
||||
import com.yizhuan.xchat_android_library.utils.ResUtil
|
||||
import com.yizhuan.xchat_android_library.utils.SingleToastUtil
|
||||
import com.yizhuan.xchat_android_library.utils.codec.DESUtils
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import org.greenrobot.eventbus.Subscribe
|
||||
import org.greenrobot.eventbus.ThreadMode
|
||||
|
||||
@ActLayoutRes(R.layout.dialog_red_package_send)
|
||||
class RedPackageSendDialog : BaseDialog<DialogRedPackageSendBinding>(), GridPasswordNoFocusView.OnPasswordChangedListener, TextWatcher {
|
||||
|
||||
private var passWordFragment: GiveGoldPassWordFragment? = null
|
||||
private val dialogManager by lazy { DialogManager(context) }
|
||||
private var isAll = false
|
||||
private var isGift = false
|
||||
|
||||
override fun onStart() {
|
||||
width = WindowManager.LayoutParams.MATCH_PARENT
|
||||
height = WindowManager.LayoutParams.WRAP_CONTENT
|
||||
super.onStart()
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun init() {
|
||||
|
||||
EventBus.getDefault().register(this)
|
||||
PayModel.get().currentWalletInfo?.let {
|
||||
binding?.tvBalanceNum?.text = it.diamondNum.toInt().toString()
|
||||
}
|
||||
if (InitialModel.get().cacheInitInfo == null) {
|
||||
InitialModel.get().init(true)
|
||||
SingleToastUtil.showToast(ResUtil.getString(R.string.avroom_redpackage_redpackagesenddialog_01))
|
||||
dismissAllowingStateLoss()
|
||||
return
|
||||
}
|
||||
val initInfo = InitialModel.get().cacheInitInfo ?: InitInfo()
|
||||
|
||||
/**
|
||||
* 廳內
|
||||
*/
|
||||
fun changeToNotAll() {
|
||||
isAll = false
|
||||
binding?.tvAllRed?.alpha = 0.5f
|
||||
binding?.tvRoomRed?.alpha = 1f
|
||||
binding?.indicatorAllRed?.visibility = View.GONE
|
||||
binding?.indicatorRoomRed?.visibility = View.VISIBLE
|
||||
binding?.tvGoldNumHint?.text = "紅包總金額不低於${initInfo.redEnvelopeConfig.roomRedEnvelopeMinAmount}鉆石,且必須為10的倍數"
|
||||
binding?.editRedNum?.hint = "${initInfo.redEnvelopeConfig.roomRedEnvelopeMinNum}-${initInfo.redEnvelopeConfig.roomRedEnvelopeMaxNum}"
|
||||
}
|
||||
|
||||
/**
|
||||
* 全服
|
||||
*/
|
||||
fun changeToAll() {
|
||||
isAll = true
|
||||
binding?.tvAllRed?.alpha = 1f
|
||||
binding?.tvRoomRed?.alpha = 0.5f
|
||||
binding?.indicatorAllRed?.visibility = View.VISIBLE
|
||||
binding?.indicatorRoomRed?.visibility = View.GONE
|
||||
binding?.tvGoldNumHint?.text = "紅包總金額不低於${initInfo.redEnvelopeConfig.serverRedEnvelopeMinAmount}鉆石,且必須為100的倍數"
|
||||
binding?.editRedNum?.hint = "${initInfo.redEnvelopeConfig.serverRedEnvelopeMinNum}-${initInfo.redEnvelopeConfig.serverRedEnvelopeMaxNum}"
|
||||
}
|
||||
|
||||
when (initInfo.redEnvelopedPosition) {
|
||||
2 -> changeToAll()
|
||||
else -> changeToNotAll()
|
||||
}
|
||||
binding?.tvCharge?.paint?.flags = Paint.UNDERLINE_TEXT_FLAG
|
||||
binding?.tvCharge?.paint?.isAntiAlias = true
|
||||
binding?.tvChangeType?.paint?.flags = Paint.UNDERLINE_TEXT_FLAG
|
||||
binding?.tvChangeType?.paint?.isAntiAlias = true
|
||||
binding?.tvChangeType?.setOnClickListener {
|
||||
if (isGift) {
|
||||
isGift = false
|
||||
binding?.tvRedTypeHint?.text = "當前為手氣紅包,"
|
||||
binding?.tvChangeType?.text = "改為禮物紅包"
|
||||
} else {
|
||||
isGift = true
|
||||
binding?.tvRedTypeHint?.text = "當前為禮物紅包,"
|
||||
binding?.tvChangeType?.text = "改為手氣紅包"
|
||||
}
|
||||
}
|
||||
//默認就已經是手氣紅包,如果後臺配置為了禮物紅包就在這裏改下
|
||||
if (initInfo.redEnvelopeType == 2 && !isGift) {
|
||||
binding?.tvChangeType?.callOnClick()
|
||||
}
|
||||
|
||||
binding?.tvCharge?.setOnClickListener {
|
||||
if (!CommonUtils.isFastDoubleClick(800)) {
|
||||
if (AppMetaDataUtil.getChannelID() == Constants.GOOGLE) {
|
||||
ChargeActivity.start(context)
|
||||
} else {
|
||||
CommonWebViewActivity.start(
|
||||
context, UriProvider.getOfficialPay(
|
||||
4,
|
||||
DeviceUtil.getDeviceId(context)
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
binding?.ivClose?.setOnClickListener { dismissAllowingStateLoss() }
|
||||
binding?.ivHelp?.setOnClickListener { DialogWebViewActivity.start(context, UriProvider.getRedPacketRule()) }
|
||||
binding?.ivSend?.setOnClickListener {
|
||||
UserModel.get().cacheLoginUserInfo?.let {
|
||||
if (!it.isBindPaymentPwd) {
|
||||
ModifyPwdActivity.start(context, ModifyPwdActivity.PAY_PWD)
|
||||
return@setOnClickListener
|
||||
}
|
||||
}
|
||||
val minNum = if (isAll) initInfo.redEnvelopeConfig.serverRedEnvelopeMinNum else initInfo.redEnvelopeConfig.roomRedEnvelopeMinNum
|
||||
val maxNum = if (isAll) initInfo.redEnvelopeConfig.serverRedEnvelopeMaxNum else initInfo.redEnvelopeConfig.roomRedEnvelopeMaxNum
|
||||
val minGold = if (isAll) initInfo.redEnvelopeConfig.serverRedEnvelopeMinAmount else initInfo.redEnvelopeConfig.roomRedEnvelopeMinAmount
|
||||
val maxGold = if (isAll) initInfo.redEnvelopeConfig.serverRedEnvelopeMaxAmount else initInfo.redEnvelopeConfig.roomRedEnvelopeMaxAmount
|
||||
val rate = if (initInfo.redEnvelopeConfig.exchangeDiamondsRate == 0.0) 0.68 else initInfo.redEnvelopeConfig.exchangeDiamondsRate
|
||||
|
||||
val redNum = binding?.editRedNum?.text.toString().toIntOrDef()
|
||||
if (redNum < minNum || redNum > maxNum) {
|
||||
SingleToastUtil.showToast("紅包數量不能小於${minNum}或大於${maxNum}!")
|
||||
return@setOnClickListener
|
||||
}
|
||||
val goldNum = binding?.editGoldNum?.text.toString().toIntOrDef()
|
||||
|
||||
if (isAll) {
|
||||
if (goldNum % 100 != 0) {
|
||||
SingleToastUtil.showToast("鉆石數必須為100的倍數!")
|
||||
return@setOnClickListener
|
||||
}
|
||||
} else {
|
||||
if (goldNum % 10 != 0) {
|
||||
SingleToastUtil.showToast("鉆石數必須為10的倍數!")
|
||||
return@setOnClickListener
|
||||
}
|
||||
}
|
||||
|
||||
if (goldNum < minGold || goldNum > maxGold) {
|
||||
SingleToastUtil.showToast("鉆石數量不能小於${minGold}或大於${maxGold}!")
|
||||
return@setOnClickListener
|
||||
}
|
||||
if (isGift && goldNum.toFloat() / redNum < 1) {//單個禮物紅包價值不低於1鉆石
|
||||
SingleToastUtil.showToast("單個紅包金額過低")
|
||||
return@setOnClickListener
|
||||
}
|
||||
if (!isGift && goldNum.toFloat() / redNum * rate < 0.1) {//單個手氣紅包價值不低於0.1水晶
|
||||
SingleToastUtil.showToast("單個紅包金額過低")
|
||||
return@setOnClickListener
|
||||
}
|
||||
GiveGoldPassWordFragment.newInstance(childFragmentManager, binding?.editGoldNum?.text.toString()).apply {
|
||||
setListener(this@RedPackageSendDialog)
|
||||
passWordFragment = this
|
||||
}
|
||||
};
|
||||
binding?.tvAllRed?.setOnClickListener {
|
||||
if (isAll) return@setOnClickListener
|
||||
changeToAll()
|
||||
}
|
||||
binding?.tvRoomRed?.setOnClickListener {
|
||||
if (!isAll) return@setOnClickListener
|
||||
changeToNotAll()
|
||||
}
|
||||
binding?.editRedText?.addTextChangedListener(this)
|
||||
|
||||
binding?.editRedText?.setOnEditorActionListener { _, _, event ->
|
||||
event.keyCode == KeyEvent.KEYCODE_ENTER
|
||||
}
|
||||
|
||||
// StatUtil.onEvent("room_sendhongbao", "進入發紅包頁面")
|
||||
}
|
||||
|
||||
private fun getRedType(): Int {
|
||||
return if (isAll) {
|
||||
if (isGift) ALL_GIFT else ALL_DIAMOND
|
||||
} else {
|
||||
if (isGift) ROOM_GIFT else ROOM_DIAMOND
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
binding?.editRedText?.removeTextChangedListener(this)
|
||||
super.onDestroyView()
|
||||
}
|
||||
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
override fun onTextChanged(psw: String) {
|
||||
val password = passWordFragment?.password?.password ?: ""
|
||||
if (password.length == 6) {
|
||||
LogUtils.d("onTextChanged() editGoldNum:${binding?.editGoldNum?.text.toString()} NUM:${binding?.editRedNum?.text.toString()}")
|
||||
// dialogManager.showProgressDialog(context)
|
||||
// RedPackageModel.sendRedPackage(binding?.editGoldNum?.text.toString(),
|
||||
// binding?.editRedText?.text.toString().ifEmpty { "恭喜發財,大吉大利!" },
|
||||
// binding?.editRedNum?.text.toString(),
|
||||
// AvRoomDataManager.get().mCurrentRoomInfo?.uid.toString(), getRedType(), DESUtils.DESAndBase64(password))
|
||||
// .doOnError {
|
||||
// dialogManager.dismissDialog()
|
||||
// SingleToastUtil.showToast(it.message)
|
||||
// passWordFragment?.password?.clearPassword()
|
||||
// }
|
||||
// .subscribe { _ ->
|
||||
// PayModel.get().getWalletInfo(AuthModel.get().currentUid).subscribe()
|
||||
// dialogManager.dismissDialog()
|
||||
// SingleToastUtil.showToast("發送成功")
|
||||
// passWordFragment?.dismissAllowingStateLoss()
|
||||
// dismissAllowingStateLoss()
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
fun onWalletInfoUpdate(event: UpdateWalletInfoEvent?) {
|
||||
binding?.tvBalanceNum?.text = PayModel.get().currentWalletInfo?.diamondNum?.toString()
|
||||
?: "0"
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
super.onDestroy()
|
||||
EventBus.getDefault().unregister(this)
|
||||
}
|
||||
|
||||
override fun onInputFinish(psw: String) {
|
||||
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun afterTextChanged(s: Editable) {
|
||||
binding?.tvRedTextLimit?.text = "${s.length}/20"
|
||||
}
|
||||
|
||||
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
|
||||
}
|
||||
|
||||
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
|
||||
}
|
||||
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
fun handleRedPackageDialog(event: RedPackageEvent?) {
|
||||
dismissAllowingStateLoss()
|
||||
}
|
||||
|
||||
}
|
@@ -11,7 +11,7 @@ import androidx.lifecycle.Observer
|
||||
import com.chuhai.utils.ServiceTime
|
||||
import com.chuhai.utils.ktx.singleClick
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.avroom.redpackage.open.RedPackageOpenDialog2
|
||||
import com.yizhuan.erban.avroom.redpackage.open.RedPackageOpenDialog
|
||||
import com.yizhuan.erban.common.widget.dialog.DialogManager
|
||||
import com.yizhuan.xchat_android_core.redpackage.RedPackageModel
|
||||
import com.yizhuan.xchat_android_core.redpackage.RedPackageNotifyInfo
|
||||
@@ -214,7 +214,7 @@ class RedPackageWidget : ConstraintLayout, RoomWidget {
|
||||
|
||||
else -> {
|
||||
roomView?.getActivity().let {
|
||||
RedPackageOpenDialog2.newInstance(item).show(it)
|
||||
RedPackageOpenDialog.newInstance(item).show(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -49,7 +49,7 @@ import java.util.concurrent.TimeUnit
|
||||
* Desc:领取红包
|
||||
**/
|
||||
@ActLayoutRes(R.layout.red_package_open_dialog)
|
||||
class RedPackageOpenDialog2 : BaseDialog<RedPackageOpenDialogBinding>(), ILog {
|
||||
class RedPackageOpenDialog : BaseDialog<RedPackageOpenDialogBinding>(), ILog {
|
||||
|
||||
private var btnAnimator: ObjectAnimator? = null
|
||||
|
||||
@@ -82,7 +82,7 @@ class RedPackageOpenDialog2 : BaseDialog<RedPackageOpenDialogBinding>(), ILog {
|
||||
/**
|
||||
* 此入口来源仅限:【全服红包信令】、【厅内无门槛-立即生效红包信令】
|
||||
*/
|
||||
fun newInstance(data: RedPackageNotifyInfo): RedPackageOpenDialog2 {
|
||||
fun newInstance(data: RedPackageNotifyInfo): RedPackageOpenDialog {
|
||||
/**
|
||||
* 收到这两种信令直接展示即可,无需再次请求接口查询状态,
|
||||
* 但由于信令和接口查询的数据格式不一致,所以这里做下转换,达到逻辑共用
|
||||
@@ -116,8 +116,8 @@ class RedPackageOpenDialog2 : BaseDialog<RedPackageOpenDialogBinding>(), ILog {
|
||||
return newInstance(item)
|
||||
}
|
||||
|
||||
fun newInstance(data: RedPackageData): RedPackageOpenDialog2 {
|
||||
return RedPackageOpenDialog2().apply {
|
||||
fun newInstance(data: RedPackageData): RedPackageOpenDialog {
|
||||
return RedPackageOpenDialog().apply {
|
||||
arguments = Bundle().apply {
|
||||
putSerializable(Constants.KEY_INTENT, data)
|
||||
}
|
@@ -251,7 +251,7 @@ class PrivateRedPackageEditorFragment : BaseBindingFragment<RedPackagePrivateFra
|
||||
dialogManager.dismissDialog()
|
||||
SingleToastUtil.showToast("發送成功")
|
||||
passWordFragment?.dismissAllowingStateLoss()
|
||||
(parentFragment as? RedPackageSendDialog2)?.dismissAllowingStateLoss()
|
||||
(parentFragment as? RedPackageSendDialog)?.dismissAllowingStateLoss()
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -127,7 +127,7 @@ class PublicRedPackageEditorFragment : BaseBindingFragment<RedPackagePublicFragm
|
||||
dialogManager.dismissDialog()
|
||||
SingleToastUtil.showToast("發送成功")
|
||||
passWordFragment?.dismissAllowingStateLoss()
|
||||
(parentFragment as? RedPackageSendDialog2)?.dismissAllowingStateLoss()
|
||||
(parentFragment as? RedPackageSendDialog)?.dismissAllowingStateLoss()
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -2,8 +2,10 @@ package com.yizhuan.erban.avroom.redpackage.send
|
||||
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import android.view.Gravity
|
||||
import android.view.WindowManager
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.chuhai.utils.ktx.singleClick
|
||||
import com.chuhai.utils.ktx.toStringRes
|
||||
import com.yizhuan.erban.R
|
||||
@@ -36,7 +38,37 @@ import org.greenrobot.eventbus.ThreadMode
|
||||
* Desc:发红包
|
||||
**/
|
||||
@ActLayoutRes(R.layout.red_package_send_dialog)
|
||||
class RedPackageSendDialog2 : BaseDialog<RedPackageSendDialogBinding>() {
|
||||
class RedPackageSendDialog : BaseDialog<RedPackageSendDialogBinding>() {
|
||||
|
||||
private val permissionType: Int
|
||||
get() = arguments?.getInt(com.yizhuan.xchat_android_core.support.config.Constants.KEY_INTENT)
|
||||
?: 0
|
||||
|
||||
/**
|
||||
* 是否有厅内红包权限
|
||||
*/
|
||||
private val haveRoomRedPackagePermission get() = (permissionType and 1) != 0
|
||||
|
||||
/**
|
||||
* 是否有全服红包权限
|
||||
*/
|
||||
private val haveAllServicePackagePermission get() = (permissionType and 2) != 0
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* 红包权限类型
|
||||
*/
|
||||
fun newInstance(permissionType: Int): RedPackageSendDialog {
|
||||
return RedPackageSendDialog().apply {
|
||||
this.arguments = Bundle().apply {
|
||||
putInt(
|
||||
com.yizhuan.xchat_android_core.support.config.Constants.KEY_INTENT,
|
||||
permissionType
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onStart() {
|
||||
gravity = Gravity.BOTTOM
|
||||
@@ -48,6 +80,11 @@ class RedPackageSendDialog2 : BaseDialog<RedPackageSendDialogBinding>() {
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun init() {
|
||||
EventBus.getDefault().register(this)
|
||||
if (!haveRoomRedPackagePermission && !haveAllServicePackagePermission) {
|
||||
SingleToastUtil.showToast(R.string.avroom_presenter_avroompresenter_04)
|
||||
dismissAllowingStateLoss()
|
||||
return
|
||||
}
|
||||
if (InitialModel.get().cacheInitInfo == null) {
|
||||
InitialModel.get().init(true)
|
||||
SingleToastUtil.showToast(ResUtil.getString(R.string.avroom_redpackage_redpackagesenddialog_01))
|
||||
@@ -62,10 +99,16 @@ class RedPackageSendDialog2 : BaseDialog<RedPackageSendDialogBinding>() {
|
||||
}
|
||||
|
||||
private fun initView() {
|
||||
val tabTitles = arrayListOf(
|
||||
R.string.red_package_room.toStringRes(),
|
||||
R.string.red_package_public.toStringRes()
|
||||
)
|
||||
val tabTitles = ArrayList<String>()
|
||||
val fragments = ArrayList<Fragment>()
|
||||
if (haveRoomRedPackagePermission) {
|
||||
tabTitles.add(R.string.red_package_room.toStringRes())
|
||||
fragments.add(PrivateRedPackageEditorFragment())
|
||||
}
|
||||
if (haveAllServicePackagePermission) {
|
||||
tabTitles.add(R.string.red_package_public.toStringRes())
|
||||
fragments.add(PublicRedPackageEditorFragment())
|
||||
}
|
||||
val topMagicIndicatorAdapter = TabIndicatorAdapter(context, tabTitles)
|
||||
topMagicIndicatorAdapter.setOnItemSelectListener {
|
||||
binding.viewPager.currentItem = it
|
||||
@@ -74,8 +117,6 @@ class RedPackageSendDialog2 : BaseDialog<RedPackageSendDialogBinding>() {
|
||||
commonNavigator.isAdjustMode = true
|
||||
commonNavigator.adapter = topMagicIndicatorAdapter
|
||||
binding.tabLayout.navigator = commonNavigator
|
||||
val fragments =
|
||||
arrayListOf(PrivateRedPackageEditorFragment(), PublicRedPackageEditorFragment())
|
||||
binding.viewPager.adapter = ViewPagerAdapter(
|
||||
childFragmentManager,
|
||||
fragments.toList(),
|
@@ -50,7 +50,6 @@ import androidx.fragment.app.FragmentManager;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.chuhai.utils.log.ILog;
|
||||
import com.google.gson.Gson;
|
||||
import com.netease.nim.uikit.common.util.log.LogUtil;
|
||||
import com.netease.nimlib.sdk.NIMSDK;
|
||||
@@ -70,8 +69,7 @@ import com.yizhuan.erban.avroom.activity.AVRoomActivity;
|
||||
import com.yizhuan.erban.avroom.firstcharge.FirstChargeDialog;
|
||||
import com.yizhuan.erban.avroom.redpackage.RedPackageGoRoomDialog;
|
||||
import com.yizhuan.erban.avroom.redpackage.RedPackageHandler;
|
||||
import com.yizhuan.erban.avroom.redpackage.RedPackageOpenDialog;
|
||||
import com.yizhuan.erban.avroom.redpackage.open.RedPackageOpenDialog2;
|
||||
import com.yizhuan.erban.avroom.redpackage.open.RedPackageOpenDialog;
|
||||
import com.yizhuan.erban.common.LoadingFragment;
|
||||
import com.yizhuan.erban.common.NetworkErrorFragment;
|
||||
import com.yizhuan.erban.common.NoDataFragment;
|
||||
@@ -969,7 +967,7 @@ public abstract class BaseActivity extends RxAppCompatActivity
|
||||
redPackageHandler.onAllServiceSignaling(this, notifyInfo);
|
||||
} else {
|
||||
if (roomInfo != null && roomInfo.getUid() == notifyInfo.getRoomUid() && context instanceof AVRoomActivity) {
|
||||
RedPackageOpenDialog2.Companion.newInstance(notifyInfo).show(BaseActivity.this);
|
||||
RedPackageOpenDialog.Companion.newInstance(notifyInfo).show(BaseActivity.this);
|
||||
} else {
|
||||
RedPackageGoRoomDialog.Companion.newInstance(notifyInfo).show(this);
|
||||
}
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 68 KiB |
Binary file not shown.
Before Width: | Height: | Size: 7.7 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 13 KiB |
Binary file not shown.
Before Width: | Height: | Size: 10 KiB |
Binary file not shown.
Before Width: | Height: | Size: 25 KiB |
@@ -1,328 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout 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">
|
||||
|
||||
<data>
|
||||
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_red"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:background="@drawable/room_red_package_open_bg"
|
||||
app:layout_constraintDimensionRatio="325:450"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/line1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.1444" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/line2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.4889" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/line3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.6278" />
|
||||
|
||||
|
||||
|
||||
<com.yizhuan.erban.common.widget.CircleImageView
|
||||
android:id="@+id/iv_avatar"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:src="@drawable/default_avatar"
|
||||
app:cborder_width="1dp"
|
||||
app:cborder_color="@color/white"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/line1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nickname"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:textColor="#fffdcd00"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_avatar"
|
||||
tools:text="@string/layout_dialog_red_package_open_01" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/line2"
|
||||
tools:text="@string/layout_dialog_red_package_open_02" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_open"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/room_red_package_open_btn"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/line3" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_opened"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:background="@drawable/room_red_package_get_bg"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintDimensionRatio="325:450"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/line0_opened"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.158" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/line1_opened"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.1756" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/line2_opened"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.3000" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/line3_opened"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.378" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/line4"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.459" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/line5"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.5" />
|
||||
|
||||
<com.yizhuan.erban.common.widget.CircleImageView
|
||||
android:id="@+id/iv_avatar_opened"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:src="@drawable/default_avatar"
|
||||
app:cborder_color="@color/white"
|
||||
app:cborder_width="1dp"
|
||||
app:layout_constraintEnd_toStartOf="@id/tv_nickname_opened"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/line2_opened" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_diamond_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:text="88"
|
||||
android:textColor="#454545"
|
||||
android:textSize="40sp"
|
||||
android:includeFontPadding="false"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:drawableStart="@drawable/ic_redpackage_bigdiamond"
|
||||
android:drawablePadding="6dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/line0_opened"
|
||||
app:layout_constraintVertical_bias="0.66" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_tips"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:includeFontPadding="false"
|
||||
android:text="@string/layout_dialog_red_package_open_03"
|
||||
android:textColor="#FF9DA6"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/line1_opened" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nickname_opened"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="7dp"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:maxLength="10"
|
||||
android:text="@string/layout_dialog_red_package_open_04"
|
||||
android:textColor="#fffdcd00"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_avatar_opened"
|
||||
app:layout_constraintEnd_toStartOf="@id/tv_of_red"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_avatar_opened"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_avatar_opened" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_of_red"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/layout_dialog_red_package_open_05"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/iv_avatar_opened"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_nickname_opened"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_avatar_opened" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_content_opened"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:text="@string/layout_dialog_red_package_open_06"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/line3_opened" />
|
||||
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_gift"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_tips"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_content_opened"
|
||||
tools:itemCount="1"
|
||||
tools:listitem="@layout/item_red_package_gift_top" />
|
||||
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_no_get"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/layout_dialog_red_package_open_07"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="16sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/line0_opened"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_red_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:includeFontPadding="false"
|
||||
android:text="@string/layout_dialog_red_package_open_08"
|
||||
android:textColor="#80ffffff"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/line4" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_red_text"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:layout_marginBottom="40dp"
|
||||
android:background="@drawable/shape_eb203e_round_10dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/line5">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_users"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:src="@drawable/room_red_package_open_btn"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/line5" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.Barrier
|
||||
android:id="@+id/banner"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:barrierDirection="bottom"
|
||||
app:constraint_referenced_ids="cl_opened,cl_red" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_close"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:src="@drawable/room_red_package_close"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/banner" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
@@ -1,369 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout 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">
|
||||
|
||||
<data>
|
||||
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_red"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:background="@drawable/room_red_package_bg"
|
||||
app:layout_constraintDimensionRatio="325:450"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/line1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.1333" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/line2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.2445" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/line3"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.3580" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/line4"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.5167" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/line5"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.7667" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_help"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:src="@drawable/room_red_package_help"
|
||||
app:layout_constraintBottom_toTopOf="@id/line1"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_room_red"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="40dp"
|
||||
android:text="@string/layout_dialog_red_package_send_01"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintEnd_toStartOf="@id/tv_all_red"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/line1" />
|
||||
|
||||
<View
|
||||
android:id="@+id/indicator_room_red"
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="2dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/shape_white_round_2dp"
|
||||
app:layout_constraintEnd_toEndOf="@id/tv_room_red"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_room_red"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_room_red" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_all_red"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:alpha="0.5"
|
||||
android:text="@string/layout_dialog_red_package_send_02"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_room_red"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_room_red" />
|
||||
|
||||
<View
|
||||
android:id="@+id/indicator_all_red"
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="2dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/shape_white_round_2dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="@id/tv_all_red"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_all_red"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_all_red" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_red_num"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:background="@drawable/shape_ffbdcc_round_100dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/line2">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/layout_dialog_red_package_send_03"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edit_red_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:background="@null"
|
||||
android:gravity="end"
|
||||
android:hint="1-200"
|
||||
android:inputType="number"
|
||||
android:maxLength="8"
|
||||
android:minWidth="30dp"
|
||||
android:textColor="#ffffffff"
|
||||
android:textColorHint="#80ffffff"
|
||||
android:textCursorDrawable="@null"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/tv_red_num"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_red_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:text="@string/layout_dialog_red_package_send_04"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_red_type_hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:visibility="gone"
|
||||
android:text="@string/layout_dialog_red_package_send_05"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintStart_toStartOf="@id/cl_red_num"
|
||||
app:layout_constraintTop_toBottomOf="@id/cl_red_num" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_change_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/layout_dialog_red_package_send_06"
|
||||
android:textColor="#FECF00"
|
||||
android:textSize="10sp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_red_type_hint"
|
||||
app:layout_constraintStart_toEndOf="@id/tv_red_type_hint"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_red_type_hint" />
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_gold_num"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:background="@drawable/shape_ffbdcc_round_100dp"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
app:layout_constraintTop_toBottomOf="@id/line3">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/layout_dialog_red_package_send_07"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edit_gold_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:background="@null"
|
||||
android:gravity="end"
|
||||
android:hint="0"
|
||||
android:inputType="number"
|
||||
android:maxLength="8"
|
||||
android:minWidth="30dp"
|
||||
android:textColor="#ffffffff"
|
||||
android:textColorHint="#80ffffff"
|
||||
android:textCursorDrawable="@null"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/tv_gold_num"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_gold_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:text="@string/layout_dialog_red_package_send_08"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_gold_num_hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:alpha="0.5"
|
||||
android:text="@string/layout_dialog_red_package_send_09"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="11sp"
|
||||
app:layout_constraintStart_toStartOf="@id/cl_gold_num"
|
||||
app:layout_constraintTop_toBottomOf="@id/cl_gold_num" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_red_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="80dp"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:background="@drawable/shape_eb203e_round_10dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/line4">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/edit_red_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:background="@null"
|
||||
android:gravity="center"
|
||||
android:hint="@string/layout_dialog_red_package_send_010"
|
||||
android:maxLength="20"
|
||||
android:maxLines="2"
|
||||
android:textColor="#ffffffff"
|
||||
android:textColorHint="#80ffffff"
|
||||
android:textCursorDrawable="@null"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_red_text_limit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|bottom"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_marginBottom="4dp"
|
||||
android:text="0/20"
|
||||
android:textColor="#ffff8c9d"
|
||||
android:textSize="10sp" />
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_return_gold_hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:text="@string/layout_dialog_red_package_send_011"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="10sp"
|
||||
android:alpha="0.5"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/fl_red_text" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_send"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/room_red_package_send"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/line5" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_balance_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:includeFontPadding="false"
|
||||
android:gravity="center"
|
||||
android:drawablePadding="@dimen/dp_4"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginStart="50dp"
|
||||
android:layout_marginBottom="35dp"
|
||||
android:drawableStart="@drawable/ic_redpackage_diamond"
|
||||
tools:text="12531" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_charge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="50dp"
|
||||
android:layout_marginBottom="35dp"
|
||||
android:autoLink="all"
|
||||
android:text="@string/charge_diamond"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_13"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_close"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:src="@drawable/room_red_package_close"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/cl_red" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
@@ -1,88 +0,0 @@
|
||||
<?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:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingStart="10dp"
|
||||
android:paddingEnd="10dp"
|
||||
tools:layout_width="200dp"
|
||||
tools:background="#fd2772">
|
||||
|
||||
<com.yizhuan.erban.common.widget.CircleImageView
|
||||
android:id="@+id/iv_avatar"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:src="@drawable/default_avatar"
|
||||
app:cborder_width="1dp"
|
||||
app:cborder_color="@color/white"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nickname"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="7dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:ellipsize="end"
|
||||
android:lines="1"
|
||||
android:text="@string/layout_item_red_package_diamond_01"
|
||||
android:textColor="#fffdcd00"
|
||||
android:textSize="15sp"
|
||||
app:layout_constraintBottom_toTopOf="@id/tv_time"
|
||||
app:layout_constraintEnd_toStartOf="@id/tv_diamond_num"
|
||||
app:layout_constraintStart_toEndOf="@id/iv_avatar"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintVertical_chainStyle="packed" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="2020/01/01 00:00"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="10sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/tv_nickname"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_nickname" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_diamond_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="88"
|
||||
android:textColor="#ffffffff"
|
||||
android:textSize="20sp"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:drawablePadding="@dimen/dp_5"
|
||||
android:drawableEnd="@drawable/ic_redpackage_diamond"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_gift"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="25dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<View
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="1px"
|
||||
android:background="#C80C27"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -1,39 +0,0 @@
|
||||
<?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:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
tools:background="@color/red">
|
||||
|
||||
<com.yizhuan.erban.common.widget.CircleImageView
|
||||
android:id="@+id/iv_gift"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginBottom="5dp"
|
||||
android:src="@drawable/default_avatar"
|
||||
app:cborder_color="@color/white"
|
||||
app:cborder_width="1px"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<com.coorchice.library.SuperTextView
|
||||
android:id="@+id/tv_gift_num"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="10dp"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:text="x10"
|
||||
android:textColor="#FDCD00"
|
||||
android:textSize="9sp"
|
||||
app:corner="5dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@id/iv_gift"
|
||||
app:layout_constraintStart_toStartOf="@id/iv_gift"
|
||||
app:solid="#FD6178"
|
||||
app:stroke_color="@color/white"
|
||||
app:stroke_width="1px" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -208,7 +208,10 @@ public final class AvRoomDataManager {
|
||||
* 是否在嗨聊房
|
||||
*/
|
||||
private boolean isParty;
|
||||
private boolean redEnvelopeOpen;
|
||||
/**
|
||||
* 红包发送权限:1 厅内红包 2 全服红包 3 厅内红包+全服红包
|
||||
*/
|
||||
private int redEnvelopeType;
|
||||
/**
|
||||
* 缓存师父的 UID
|
||||
*/
|
||||
@@ -290,7 +293,7 @@ public final class AvRoomDataManager {
|
||||
clearScreenTime = roomInfo.getClearScreenTime();
|
||||
showPkBeginTime = roomInfo.isShowPkBeginTime();
|
||||
pkBeginTime = roomInfo.getPkBeginTime();
|
||||
redEnvelopeOpen = roomInfo.isRedEnvelopeOpen();
|
||||
redEnvelopeType = roomInfo.getRedEnvelopeType();
|
||||
hasRoomAlbum = roomInfo.isHasRoomAlbum();
|
||||
}
|
||||
|
||||
@@ -1209,12 +1212,8 @@ public final class AvRoomDataManager {
|
||||
isParty = party;
|
||||
}
|
||||
|
||||
public boolean isRedEnvelopeOpen() {
|
||||
return redEnvelopeOpen;
|
||||
}
|
||||
|
||||
public void setRedEnvelopeOpen(boolean redEnvelopeOpen) {
|
||||
this.redEnvelopeOpen = redEnvelopeOpen;
|
||||
public int getRedEnvelopeType() {
|
||||
return redEnvelopeType;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -205,6 +205,7 @@ public class RoomInfo implements Parcelable,Serializable {
|
||||
hideFlag = in.readInt();
|
||||
closeScreenFlag = in.readInt();
|
||||
redEnvelopeOpen = in.readByte() != 0;
|
||||
redEnvelopeType = in.readInt();
|
||||
blindDateState = in.readString();
|
||||
blindDateVipUid = in.readLong();
|
||||
canOpenBlindDate = in.readByte() != 0;
|
||||
@@ -268,6 +269,7 @@ public class RoomInfo implements Parcelable,Serializable {
|
||||
dest.writeInt(hideFlag);
|
||||
dest.writeInt(closeScreenFlag);
|
||||
dest.writeByte((byte) (redEnvelopeOpen ? 1 : 0));
|
||||
dest.writeInt(redEnvelopeType);
|
||||
dest.writeString(blindDateState);
|
||||
dest.writeLong(blindDateVipUid);
|
||||
dest.writeByte((byte) (canOpenBlindDate ? 1 : 0));
|
||||
@@ -324,7 +326,12 @@ public class RoomInfo implements Parcelable,Serializable {
|
||||
*/
|
||||
private int closeScreenFlag;
|
||||
|
||||
@Deprecated(since = "2.2.0版本起,建议用redEnvelopeType判断即可")
|
||||
private boolean redEnvelopeOpen;
|
||||
/**
|
||||
* 发送红包权限:0 无、1 厅内红包、2 全服红包、3 厅内红包+全服红包
|
||||
*/
|
||||
private int redEnvelopeType;
|
||||
|
||||
/**
|
||||
* COMMUNICATING(1, ResUtil.getString(R.string.room_bean_roominfo_04)),
|
||||
|
Reference in New Issue
Block a user