房间 "夺宝精灵" 新增 自定义购买数量碎片弹窗
This commit is contained in:
@@ -26,7 +26,7 @@ dependencies {
|
||||
api 'androidx.annotation:annotation:1.4.0'
|
||||
api 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
implementation "androidx.core:core-ktx:1.7.0"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
}
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
@@ -2,7 +2,6 @@ apply plugin: 'com.android.application'
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
apply plugin: 'com.google.firebase.crashlytics'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
apply plugin: 'com.tencent.vasdolly'
|
||||
apply from: '../mob.gradle'
|
||||
|
||||
@@ -65,12 +64,12 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
lint {
|
||||
abortOnError false
|
||||
disable 'MissingTranslation'
|
||||
disable 'ExtraTranslation'
|
||||
disable 'MissingTranslation', 'ExtraTranslation', 'ContentDescription'
|
||||
}
|
||||
|
||||
|
||||
dataBinding {
|
||||
enabled = true
|
||||
}
|
||||
|
@@ -16,7 +16,7 @@ abstract class BaseDialog<T : ViewBinding> : RxDialogFragment() {
|
||||
|
||||
private var _binding: T? = null
|
||||
private var onDismissListener: (() -> Unit)? = null
|
||||
val binding get() = _binding
|
||||
val binding get() = _binding!!
|
||||
open var width = ScreenUtil.getDialogWidth()
|
||||
open var height = WindowManager.LayoutParams.WRAP_CONTENT
|
||||
open var gravity = Gravity.CENTER
|
||||
|
@@ -8,6 +8,8 @@ import android.os.Bundle
|
||||
import android.os.Parcelable
|
||||
import android.text.Editable
|
||||
import android.text.TextWatcher
|
||||
import android.widget.EditText
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.base.BaseActivity
|
||||
@@ -18,7 +20,6 @@ import com.yizhuan.xchat_android_core.room.bean.SearchRoomInfo
|
||||
import com.yizhuan.xchat_android_core.room.model.AvRoomModel
|
||||
import com.yizhuan.xchat_android_core.utils.net.RxHelper
|
||||
import com.yizhuan.xchat_android_library.utils.ResUtil
|
||||
import kotlinx.android.synthetic.main.activity_give_gold_search.*
|
||||
|
||||
class GiveGoldSearchActivity : BaseActivity(), TextWatcher {
|
||||
|
||||
@@ -42,7 +43,7 @@ class GiveGoldSearchActivity : BaseActivity(), TextWatcher {
|
||||
.setPageSize(Int.MAX_VALUE)
|
||||
.setEmptyView(EmptyViewHelper.createEmptyTextView(this, ResUtil.getString(R.string.pay_activity_givegoldsearchactivity_01)))
|
||||
.setLayoutManager(LinearLayoutManager(this))
|
||||
.setRecyclerView(recyclerView)
|
||||
.setRecyclerView(findViewById(R.id.recyclerView))
|
||||
.setAdapter(adapter)
|
||||
.build()
|
||||
adapter.setOnItemClickListener { _, _, position ->
|
||||
@@ -53,8 +54,8 @@ class GiveGoldSearchActivity : BaseActivity(), TextWatcher {
|
||||
})
|
||||
finish()
|
||||
}
|
||||
editSearch.addTextChangedListener(this)
|
||||
tvCancel.setOnClickListener { finish() }
|
||||
findViewById<EditText>(R.id.editSearch).addTextChangedListener(this)
|
||||
findViewById<TextView>(R.id.tvCancel).setOnClickListener { finish() }
|
||||
}
|
||||
|
||||
override fun afterTextChanged(s: Editable?) {
|
||||
|
@@ -3,10 +3,10 @@ package com.yizhuan.erban.pay.activity
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.widget.TextView
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.base.BaseActivity
|
||||
import com.yizhuan.xchat_android_library.utils.ResUtil
|
||||
import kotlinx.android.synthetic.main.activity_give_gold_success.*
|
||||
|
||||
class GiveGoldSuccessActivity : BaseActivity() {
|
||||
|
||||
@@ -24,9 +24,9 @@ class GiveGoldSuccessActivity : BaseActivity() {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_give_gold_success)
|
||||
initTitleBar(ResUtil.getString(R.string.pay_activity_givegoldsuccessactivity_01))
|
||||
tvNickname.text = "轉贈給:${intent.getStringExtra("nickname")}"
|
||||
tvGold.text = "${intent.getStringExtra("gold")?.toInt()}鉆石"
|
||||
tvSure.setOnClickListener { finish() }
|
||||
findViewById<TextView>(R.id.tvNickname).text = "轉贈給:${intent.getStringExtra("nickname")}"
|
||||
findViewById<TextView>(R.id.tvGold).text = "${intent.getStringExtra("gold")?.toInt()}鉆石"
|
||||
findViewById<TextView>(R.id.tvSure).setOnClickListener { finish() }
|
||||
}
|
||||
|
||||
|
||||
|
@@ -10,6 +10,7 @@ import android.text.TextWatcher
|
||||
import android.util.SparseArray
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.EditText
|
||||
import androidx.activity.viewModels
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
@@ -39,7 +40,6 @@ import com.yizhuan.xchat_android_core.pay.PayModel
|
||||
import com.yizhuan.xchat_android_core.user.UserModel
|
||||
import com.yizhuan.xchat_android_core.user.bean.SearchUserInfo
|
||||
import com.yizhuan.xchat_android_library.utils.ResUtil
|
||||
import kotlinx.android.synthetic.main.activity_give_gold_to_user.*
|
||||
|
||||
class GiveGoldToUserActivity : BaseViewBindingActivity<ActivityGiveGoldToUserBinding>(),
|
||||
GridPasswordNoFocusView.OnPasswordChangedListener,
|
||||
@@ -371,7 +371,7 @@ class GiveGoldToUserActivity : BaseViewBindingActivity<ActivityGiveGoldToUserBin
|
||||
if (password.length == 6) {
|
||||
searchUserInfo?.apply {
|
||||
dialogManager.showProgressDialog(context)
|
||||
PayModel.get().giveGold(uid, mEditGold.text.toString(), DESAndBase64(password))
|
||||
PayModel.get().giveGold(uid, findViewById<EditText>(R.id.mEditGold).text.toString(), DESAndBase64(password))
|
||||
.compose(bindToLifecycle())
|
||||
.doOnError {
|
||||
toast(it.message)
|
||||
|
@@ -1,5 +1,6 @@
|
||||
package com.yizhuan.erban.treasurefairy
|
||||
|
||||
import android.util.Log
|
||||
import android.util.SparseArray
|
||||
import androidx.core.util.forEach
|
||||
import androidx.lifecycle.LiveData
|
||||
@@ -539,10 +540,18 @@ class FairyViewModel : BaseViewModel() {
|
||||
)
|
||||
}
|
||||
|
||||
fun buyDebris(num: String, uid: String) {
|
||||
fun buyDebris(num: Int, uid: String) {
|
||||
safeLaunch(
|
||||
block = {
|
||||
val result = TreasureFairyModel.buyDebris(num, uid)
|
||||
|
||||
_drawInfoLiveData.value?.apply {
|
||||
this.drawTicketNum = this.drawTicketNum + num
|
||||
_drawInfoLiveData.value = this
|
||||
}
|
||||
|
||||
initDrawInfo()
|
||||
|
||||
_buyDebrisLiveData.value = result
|
||||
}
|
||||
)
|
||||
|
@@ -8,13 +8,17 @@ import android.content.pm.ActivityInfo
|
||||
import android.graphics.Path
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.text.Editable
|
||||
import android.text.TextWatcher
|
||||
import android.text.style.ForegroundColorSpan
|
||||
import android.util.Log
|
||||
import android.view.*
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.TextView
|
||||
import androidx.activity.viewModels
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.graphics.toColorInt
|
||||
import androidx.core.widget.doAfterTextChanged
|
||||
import com.alibaba.fastjson.JSON
|
||||
import com.netease.nim.uikit.common.util.sys.ScreenUtil
|
||||
import com.netease.nimlib.sdk.chatroom.ChatRoomMessageBuilder
|
||||
@@ -22,6 +26,7 @@ import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.base.BaseViewBindingActivity
|
||||
import com.yizhuan.erban.common.widget.dialog.DialogManager
|
||||
import com.yizhuan.erban.databinding.TreasureFairyDialogHomeBinding
|
||||
import com.yizhuan.erban.treasure_box.activity.TreasureBoxActivity
|
||||
import com.yizhuan.erban.treasurefairy.dialog.*
|
||||
import com.yizhuan.erban.treasurefairy.view.CustomDrawable
|
||||
import com.yizhuan.erban.ui.webview.FairyDialogWebViewActivity
|
||||
@@ -40,6 +45,7 @@ import com.yizhuan.xchat_android_core.treasurefairy.PrizeInfo
|
||||
import com.yizhuan.xchat_android_library.common.SpConstants
|
||||
import com.yizhuan.xchat_android_library.common.util.SPUtils
|
||||
import com.yizhuan.xchat_android_library.utils.FormatUtils
|
||||
import com.yizhuan.xchat_android_library.utils.SingleToastUtil
|
||||
import com.yizhuan.xchat_android_library.utils.TimeUtils
|
||||
import io.reactivex.Observable
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
@@ -113,23 +119,45 @@ class HomeFairyActivity : BaseViewBindingActivity<TreasureFairyDialogHomeBinding
|
||||
binding.viewPrice3.setOnClickListener {
|
||||
setFairyPriceSelect(3)
|
||||
}
|
||||
|
||||
binding.etQuantity.doAfterTextChanged {
|
||||
try {
|
||||
mPrice = it.toString().toInt()
|
||||
if (mPrice > TreasureBoxActivity.MAX_BUY_QUANTITY_LIMIT) {
|
||||
mPrice = TreasureBoxActivity.MAX_BUY_QUANTITY_LIMIT
|
||||
binding.etQuantity.setText(mPrice.toString())
|
||||
binding.etQuantity.setSelection(binding.etQuantity.text.length)
|
||||
SingleToastUtil.showToast(
|
||||
getString(
|
||||
R.string.treasure_box_activity_treasureboxactivity_01,
|
||||
TreasureBoxActivity.MAX_BUY_QUANTITY_LIMIT
|
||||
)
|
||||
)
|
||||
}
|
||||
setFairyPriceSelect(0)
|
||||
} catch (e: NumberFormatException) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
binding.tvBuy.setOnClickListener {
|
||||
if (!isSelect) {
|
||||
toast("請選擇購買的碎片數量")
|
||||
} else {
|
||||
val date = SPUtils.getLong(SpConstants.FAIRY_BUY_DEBRIS, 0L)
|
||||
if (date != 0L) {
|
||||
if (TimeUtils.isToday(date)) {
|
||||
viewModel.buyDebris(
|
||||
mPrice.toString(),
|
||||
AuthModel.get().currentUid.toString()
|
||||
)
|
||||
} else {
|
||||
FairyBuyDebrisDialog.newInstance(mPrice).show(context)
|
||||
}
|
||||
return@setOnClickListener
|
||||
}
|
||||
|
||||
val date = SPUtils.getLong(SpConstants.FAIRY_BUY_DEBRIS, 0L)
|
||||
if (date != 0L) {
|
||||
if (TimeUtils.isToday(date)) {
|
||||
viewModel.buyDebris(
|
||||
mPrice,
|
||||
AuthModel.get().currentUid.toString()
|
||||
)
|
||||
} else {
|
||||
FairyBuyDebrisDialog.newInstance(mPrice).show(context)
|
||||
}
|
||||
} else {
|
||||
FairyBuyDebrisDialog.newInstance(mPrice).show(context)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -188,10 +216,6 @@ class HomeFairyActivity : BaseViewBindingActivity<TreasureFairyDialogHomeBinding
|
||||
viewModel.initDrawInfo()
|
||||
}
|
||||
|
||||
viewModel.buyDebrisLiveData.observe(this) {
|
||||
toast("購買碎片成功")
|
||||
}
|
||||
|
||||
viewModel.prizeInfoListLiveData.observe(this) {
|
||||
it?.forEachIndexed { index, prizeInfo ->
|
||||
if (index < fairyItems.size) {
|
||||
@@ -226,7 +250,10 @@ class HomeFairyActivity : BaseViewBindingActivity<TreasureFairyDialogHomeBinding
|
||||
SpannableBuilder()
|
||||
.append("還差", ForegroundColorSpan("#59FDFF".toColorInt()))
|
||||
.append("${it.needLuckyNum}", ForegroundColorSpan("#FFE8AA".toColorInt()))
|
||||
.append("幸運值,額外獲贈傳説精靈", ForegroundColorSpan("#59FDFF".toColorInt()))
|
||||
.append(
|
||||
"幸運值,額外獲贈傳説精靈",
|
||||
ForegroundColorSpan("#59FDFF".toColorInt())
|
||||
)
|
||||
.build()
|
||||
binding.ivLuckyStone.post {
|
||||
val drawable =
|
||||
@@ -253,7 +280,11 @@ class HomeFairyActivity : BaseViewBindingActivity<TreasureFairyDialogHomeBinding
|
||||
|
||||
viewModel.showGetKeyLiveData.observe(this) {
|
||||
it.getContentIfNotHandled()?.let {
|
||||
DialogManager(context).showOkCancelDialog("購買限時裝扮活動奪寶券", "去參与", "取消") {
|
||||
DialogManager(context).showOkCancelDialog(
|
||||
"購買限時裝扮活動奪寶券",
|
||||
"去參与",
|
||||
"取消"
|
||||
) {
|
||||
FairyDialogWebViewActivity.start(context, UriProvider.getFairyKey())
|
||||
}
|
||||
}
|
||||
@@ -263,6 +294,18 @@ class HomeFairyActivity : BaseViewBindingActivity<TreasureFairyDialogHomeBinding
|
||||
private fun setFairyPriceSelect(pos: Int) {
|
||||
isSelect = true
|
||||
when (pos) {
|
||||
0 -> {
|
||||
binding.viewPrice1.isSelected = false
|
||||
binding.viewPrice2.isSelected = false
|
||||
binding.viewPrice3.isSelected = false
|
||||
binding.ivDebris1.alpha = 0.4f
|
||||
binding.ivDebris2.alpha = 0.4f
|
||||
binding.ivDebris3.alpha = 0.4f
|
||||
binding.tvOne.alpha = 0.4f
|
||||
binding.tvTwo.alpha = 0.4f
|
||||
binding.tvThree.alpha = 0.4f
|
||||
}
|
||||
|
||||
1 -> {
|
||||
mPrice = 1
|
||||
binding.viewPrice1.isSelected = true
|
||||
@@ -275,6 +318,7 @@ class HomeFairyActivity : BaseViewBindingActivity<TreasureFairyDialogHomeBinding
|
||||
binding.tvTwo.alpha = 0.4f
|
||||
binding.tvThree.alpha = 0.4f
|
||||
}
|
||||
|
||||
2 -> {
|
||||
mPrice = 10
|
||||
binding.viewPrice1.isSelected = false
|
||||
@@ -287,6 +331,7 @@ class HomeFairyActivity : BaseViewBindingActivity<TreasureFairyDialogHomeBinding
|
||||
binding.tvTwo.alpha = 1f
|
||||
binding.tvThree.alpha = 0.4f
|
||||
}
|
||||
|
||||
3 -> {
|
||||
mPrice = 100
|
||||
binding.viewPrice1.isSelected = false
|
||||
@@ -307,9 +352,7 @@ class HomeFairyActivity : BaseViewBindingActivity<TreasureFairyDialogHomeBinding
|
||||
if (keyNum >= num) {
|
||||
return true
|
||||
}
|
||||
DialogManager(context).showOkCancelDialog("購買限時裝扮活動奪寶券", "去參与", "取消") {
|
||||
FairyDialogWebViewActivity.start(context, UriProvider.getFairyKey())
|
||||
}
|
||||
FairyBuyDebrisModifyQuantityDialog.newInstance(num).show(this)
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -446,6 +489,7 @@ class HomeFairyActivity : BaseViewBindingActivity<TreasureFairyDialogHomeBinding
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
CustomAttachment.CUSTOM_MSG_LUCKY_SEA -> if (baseProtocol.second == CustomAttachment.CUSTOM_MSG_LUCKY_SEA_GIFT_SERVER_ALL) {
|
||||
val attachment = RoomLuckySeaAttachment(
|
||||
CustomAttachment.CUSTOM_MSG_LUCKY_SEA,
|
||||
@@ -465,6 +509,7 @@ class HomeFairyActivity : BaseViewBindingActivity<TreasureFairyDialogHomeBinding
|
||||
IMNetEaseManager.get()
|
||||
.noticeRoomEvent(message, RoomEvent.LUCKY_SEA_GIFT_SERVER_NOTIFY)
|
||||
}
|
||||
|
||||
CustomAttachment.CUSTOM_MSG_LUCKY_GIFT -> if (baseProtocol.second == CustomAttachment.CUSTOM_MSG_LUCKY_GIFT_SERVER_NOTIFY || baseProtocol.second == CustomAttachment.CUSTOM_MSG_LUCKY_GIFT_SERVER_ALL) {
|
||||
val attachment =
|
||||
RoomReceivedLuckyGiftAttachment(CustomAttachment.CUSTOM_MSG_LUCKY_GIFT_SERVER_NOTIFY)
|
||||
@@ -479,6 +524,7 @@ class HomeFairyActivity : BaseViewBindingActivity<TreasureFairyDialogHomeBinding
|
||||
IMNetEaseManager.get().noticeServiceLuckyBagNotice(message)
|
||||
IMNetEaseManager.get().addMessages(message)
|
||||
}
|
||||
|
||||
CustomAttachment.CUSTOM_MSG_FAIRY -> if (baseProtocol.second == CustomAttachment.CUSTOM_MSG_SUB_DRAW_GIFT_L5) {
|
||||
val attachment = FairyMsgAttachment(
|
||||
CustomAttachment.CUSTOM_MSG_FAIRY,
|
||||
@@ -494,6 +540,7 @@ class HomeFairyActivity : BaseViewBindingActivity<TreasureFairyDialogHomeBinding
|
||||
)
|
||||
IMNetEaseManager.get().noticeRoomEvent(message, RoomEvent.FAIRY_DRAW_GIFT_L5)
|
||||
}
|
||||
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
|
@@ -4,7 +4,7 @@ import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import android.view.Gravity
|
||||
import android.view.WindowManager
|
||||
import androidx.fragment.app.viewModels
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import com.hjq.toast.ToastUtils
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.base.BaseDialog
|
||||
@@ -23,7 +23,7 @@ class FairyBuyDebrisDialog : BaseDialog<TreasureFairyDialogBuyDebrisBinding>() {
|
||||
override var width = WindowManager.LayoutParams.MATCH_PARENT
|
||||
override var height = WindowManager.LayoutParams.WRAP_CONTENT
|
||||
override var gravity = Gravity.CENTER
|
||||
private val viewModel: FairyViewModel by viewModels()
|
||||
private val viewModel: FairyViewModel by activityViewModels()
|
||||
|
||||
companion object {
|
||||
fun newInstance(num: Int): FairyBuyDebrisDialog {
|
||||
@@ -39,10 +39,10 @@ class FairyBuyDebrisDialog : BaseDialog<TreasureFairyDialogBuyDebrisBinding>() {
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
override fun init() {
|
||||
binding?.tvDebrisNum?.text = getString(R.string.buy_debris, num)
|
||||
binding?.tvPrizeName?.text = (num * 100).toString()
|
||||
binding.tvDebrisNum.text = getString(R.string.buy_debris, num)
|
||||
binding.tvPrizeName.text = (num * 100).toString()
|
||||
|
||||
binding?.cbPay?.setOnCheckedChangeListener { _, isChecked ->
|
||||
binding.cbPay.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (isChecked) {
|
||||
SPUtils.putLong(SpConstants.FAIRY_BUY_DEBRIS, System.currentTimeMillis())
|
||||
} else {
|
||||
@@ -50,8 +50,8 @@ class FairyBuyDebrisDialog : BaseDialog<TreasureFairyDialogBuyDebrisBinding>() {
|
||||
}
|
||||
}
|
||||
|
||||
binding?.tvBuy?.setOnClickListener {
|
||||
viewModel.buyDebris(num.toString(), AuthModel.get().currentUid.toString())
|
||||
binding.tvBuy.setOnClickListener {
|
||||
viewModel.buyDebris(num, AuthModel.get().currentUid.toString())
|
||||
}
|
||||
|
||||
viewModel.buyDebrisLiveData.observe(this) {
|
||||
|
@@ -0,0 +1,81 @@
|
||||
package com.yizhuan.erban.treasurefairy.dialog
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Bundle
|
||||
import android.view.Gravity
|
||||
import android.view.WindowManager
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import com.hjq.toast.ToastUtils
|
||||
import com.yizhuan.erban.base.BaseDialog
|
||||
import com.yizhuan.erban.databinding.TreasureFairyDialogBuyDebrisModifyQuantityBinding
|
||||
import com.yizhuan.erban.treasurefairy.FairyViewModel
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel
|
||||
import com.yizhuan.xchat_android_core.manager.AvRoomDataManager
|
||||
import com.yizhuan.xchat_android_library.common.SpConstants
|
||||
import com.yizhuan.xchat_android_library.common.util.SPUtils
|
||||
import com.yizhuan.xchat_android_library.utils.TimeUtils
|
||||
|
||||
/**
|
||||
* 购买碎片
|
||||
*/
|
||||
class FairyBuyDebrisModifyQuantityDialog :
|
||||
BaseDialog<TreasureFairyDialogBuyDebrisModifyQuantityBinding>() {
|
||||
|
||||
override var width = WindowManager.LayoutParams.MATCH_PARENT
|
||||
override var height = WindowManager.LayoutParams.WRAP_CONTENT
|
||||
override var gravity = Gravity.CENTER
|
||||
private val viewModel: FairyViewModel by activityViewModels()
|
||||
|
||||
companion object {
|
||||
fun newInstance(num: Int): FairyBuyDebrisModifyQuantityDialog {
|
||||
val args = Bundle()
|
||||
args.putInt("num", num)
|
||||
val fragment = FairyBuyDebrisModifyQuantityDialog()
|
||||
fragment.arguments = args
|
||||
return fragment
|
||||
}
|
||||
}
|
||||
|
||||
private var num = 0
|
||||
private val price by lazy { AvRoomDataManager.get().mSeizeTreasureSwitchVo?.price ?: 0 }
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
override fun init() {
|
||||
num = requireArguments().getInt("num")
|
||||
|
||||
binding.tvDebrisNum.text = num.toString()
|
||||
binding.tvPrizeName.text = (num * price).toString()
|
||||
|
||||
binding.ivDecrease.setOnClickListener {
|
||||
num = (num - 10).coerceAtLeast(1)
|
||||
binding.tvDebrisNum.text = num.toString()
|
||||
binding.tvPrizeName.text = (num * price).toString()
|
||||
}
|
||||
|
||||
binding.ivIncrease.setOnClickListener {
|
||||
num = (num + 10).coerceAtMost(200)
|
||||
binding.tvDebrisNum.text = num.toString()
|
||||
binding.tvPrizeName.text = (num * price).toString()
|
||||
}
|
||||
|
||||
binding.tvBuy.setOnClickListener {
|
||||
viewModel.buyDebris(num, AuthModel.get().currentUid.toString())
|
||||
}
|
||||
|
||||
viewModel.buyDebrisLiveData.observe(this) {
|
||||
val date = SPUtils.getLong(SpConstants.FAIRY_BUY_SUCCESS, 0L)
|
||||
if (date != 0L) {
|
||||
if (TimeUtils.isToday(date)) {
|
||||
ToastUtils.show("購買碎片成功")
|
||||
} else {
|
||||
FairyBuySuccessDialog.newInstance(num).show(context)
|
||||
}
|
||||
} else {
|
||||
FairyBuySuccessDialog.newInstance(num).show(context)
|
||||
}
|
||||
dismissAllowingStateLoss()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -34,9 +34,9 @@ class FairyBuySuccessDialog : BaseDialog<TreasureFairyDialogBuySuccessBinding>()
|
||||
|
||||
@SuppressLint("CheckResult", "SetTextI18n")
|
||||
override fun init() {
|
||||
binding?.tvDebrisNum?.text = "x${num}"
|
||||
binding.tvDebrisNum.text = "x${num}"
|
||||
|
||||
binding?.cbPay?.setOnCheckedChangeListener { buttonView, isChecked ->
|
||||
binding.cbPay.setOnCheckedChangeListener { buttonView, isChecked ->
|
||||
if (isChecked) {
|
||||
SPUtils.putLong(SpConstants.FAIRY_BUY_SUCCESS, System.currentTimeMillis())
|
||||
} else {
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.0 KiB |
@@ -0,0 +1,128 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/root_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="@dimen/dp_258"
|
||||
android:layout_height="@dimen/dp_315"
|
||||
android:layout_marginTop="@dimen/dp_22"
|
||||
android:background="@drawable/treasure_fairy_bg_forest_prize_new"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/iv_header" />
|
||||
|
||||
<View
|
||||
android:id="@+id/iv_header"
|
||||
android:layout_width="@dimen/dp_136"
|
||||
android:layout_height="@dimen/dp_44"
|
||||
android:background="@drawable/treasure_fairy_buy_debris"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_tips"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_18"
|
||||
android:text="@string/fairy_debris_not_enough_please_buy"
|
||||
android:textColor="@color/color_ffe8aa"
|
||||
android:textSize="12sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/iv_header" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_prize_icon"
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="65dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_debris_default"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_tips" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_prize_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="12dp"
|
||||
android:drawableStart="@drawable/treasure_fairy_ic_diamond"
|
||||
android:drawablePadding="@dimen/dp_4"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_bg"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_prize_icon"
|
||||
tools:text="10000" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_debris_num"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/dp_29"
|
||||
android:layout_marginStart="@dimen/dp_26"
|
||||
android:layout_marginTop="@dimen/dp_14"
|
||||
android:layout_marginEnd="@dimen/dp_26"
|
||||
android:background="@color/color_306065"
|
||||
android:gravity="center"
|
||||
android:text="@string/zero"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_12"
|
||||
app:layout_constraintEnd_toEndOf="@+id/iv_increase"
|
||||
app:layout_constraintStart_toStartOf="@+id/iv_decrease"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_prize_name" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_decrease"
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_height="@dimen/dp_29"
|
||||
android:layout_marginStart="@dimen/dp_42"
|
||||
android:src="@drawable/ic_dialog_fairy_buy_debris_decrease"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_debris_num"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_debris_num" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_increase"
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_height="@dimen/dp_29"
|
||||
android:layout_marginEnd="@dimen/dp_42"
|
||||
android:src="@drawable/ic_dialog_fairy_buy_debris_increase"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tv_debris_num"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||
app:layout_constraintTop_toTopOf="@id/tv_debris_num" />
|
||||
|
||||
<com.coorchice.library.SuperTextView
|
||||
android:id="@+id/tv_buy"
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="34dp"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:gravity="center"
|
||||
android:text="@string/layout_item_decoration_common_04"
|
||||
android:textColor="@color/color_1f5764"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold"
|
||||
app:corner="@dimen/dp_18"
|
||||
app:layout_constraintEnd_toEndOf="@id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@id/view_bg"
|
||||
app:layout_constraintTop_toBottomOf="@id/tv_debris_num"
|
||||
app:shaderEnable="true"
|
||||
app:shaderEndColor="@color/color_3AEAC7"
|
||||
app:shaderMode="topToBottom"
|
||||
app:shaderStartColor="@color/color_FFFEBB" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@@ -8,8 +8,8 @@
|
||||
|
||||
<View
|
||||
android:id="@+id/view_bg"
|
||||
android:layout_width="281dp"
|
||||
android:layout_height="285dp"
|
||||
android:layout_width="@dimen/dp_260"
|
||||
android:layout_height="@dimen/dp_244"
|
||||
android:background="@drawable/treasure_fairy_bg_forest_prize_new"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -22,35 +22,35 @@
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginBottom="@dimen/dp_16"
|
||||
android:background="@drawable/treasure_fairy_buy_success"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_bg"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tv_title"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_bg"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tv_title"/>
|
||||
app:layout_constraintStart_toStartOf="@+id/view_bg" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="48dp"
|
||||
android:text="獲得"
|
||||
android:textColor="@color/color_ffe8aa"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginTop="@dimen/dp_46"
|
||||
android:includeFontPadding="false"
|
||||
android:text="@string/avroom_widget_roomeffectview_015"
|
||||
android:textColor="@color/color_ffe8aa"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/view_bg" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_prize_icon"
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="65dp"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:layout_width="@dimen/dp_65"
|
||||
android:layout_height="@dimen/dp_65"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/ic_debris_default"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_title"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_bg"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_bg"/>
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_title" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_debris_num"
|
||||
@@ -62,27 +62,27 @@
|
||||
android:gravity="center"
|
||||
android:includeFontPadding="false"
|
||||
android:maxLines="1"
|
||||
tools:text="x1000"
|
||||
android:textColor="@color/color_ffe8aa"
|
||||
android:textSize="16sp"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_bg"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_bg"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_prize_icon"/>
|
||||
app:layout_constraintStart_toStartOf="@+id/view_bg"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_prize_icon"
|
||||
tools:text="x1000" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatCheckBox
|
||||
android:id="@+id/cbPay"
|
||||
android:text="今日不再提示"
|
||||
android:textSize="@dimen/sp_10"
|
||||
android:textColor="@color/color_white"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
android:button="@drawable/selector_select_fairy"
|
||||
android:paddingStart="@dimen/dp_6"
|
||||
android:paddingEnd="0dp"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_debris_num"
|
||||
android:text="今日不再提示"
|
||||
android:textColor="@color/color_white"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_bg"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_bg"
|
||||
app:layout_constraintEnd_toEndOf="@+id/view_bg"/>
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_debris_num" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
@@ -233,11 +233,11 @@
|
||||
android:id="@+id/iv_refresh"
|
||||
android:layout_width="10dp"
|
||||
android:layout_height="10dp"
|
||||
android:src="@drawable/ic_fairy_refresh"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_current_lucky_value"
|
||||
android:src="@drawable/ic_fairy_refresh"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/tv_current_lucky_value"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_current_lucky_value"/>
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_current_lucky_value"
|
||||
app:layout_constraintTop_toTopOf="@+id/tv_current_lucky_value" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_lucky_stone_default"
|
||||
@@ -383,8 +383,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
android:background="@drawable/ic_debris"
|
||||
android:alpha="0.4"
|
||||
android:background="@drawable/ic_debris"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/view_price_1"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_price_1"
|
||||
app:layout_constraintTop_toTopOf="@+id/view_price_1" />
|
||||
@@ -393,11 +393,11 @@
|
||||
android:id="@+id/tv_one"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_6"
|
||||
android:alpha="0.4"
|
||||
android:text="1"
|
||||
android:textColor="@color/color_F6F6F6"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:layout_marginStart="@dimen/dp_6"
|
||||
android:alpha="0.4"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/view_price_1"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_debris_1"
|
||||
app:layout_constraintTop_toTopOf="@+id/view_price_1" />
|
||||
@@ -419,8 +419,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
android:background="@drawable/ic_debris"
|
||||
android:alpha="0.4"
|
||||
android:background="@drawable/ic_debris"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/view_price_2"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_price_2"
|
||||
app:layout_constraintTop_toTopOf="@+id/view_price_2" />
|
||||
@@ -429,11 +429,11 @@
|
||||
android:id="@+id/tv_two"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
android:alpha="0.4"
|
||||
android:text="10"
|
||||
android:textColor="@color/color_F6F6F6"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
android:alpha="0.4"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/view_price_2"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_debris_2"
|
||||
app:layout_constraintTop_toTopOf="@+id/view_price_2" />
|
||||
@@ -455,8 +455,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
android:background="@drawable/ic_debris"
|
||||
android:alpha="0.4"
|
||||
android:background="@drawable/ic_debris"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/view_price_3"
|
||||
app:layout_constraintStart_toStartOf="@+id/view_price_3"
|
||||
app:layout_constraintTop_toTopOf="@+id/view_price_3" />
|
||||
@@ -465,30 +465,33 @@
|
||||
android:id="@+id/tv_three"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
android:alpha="0.4"
|
||||
android:text="100"
|
||||
android:textColor="@color/color_F6F6F6"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:layout_marginStart="@dimen/dp_2"
|
||||
android:alpha="0.4"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/view_price_3"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_debris_3"
|
||||
app:layout_constraintTop_toTopOf="@+id/view_price_3" />
|
||||
|
||||
<com.coorchice.library.SuperTextView
|
||||
<EditText
|
||||
android:id="@+id/et_quantity"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_marginEnd="@dimen/dp_8"
|
||||
android:background="@null"
|
||||
android:gravity="center"
|
||||
android:text="輸入數量"
|
||||
android:textColor="@color/color_66F6F6F6"
|
||||
android:hint="@string/please_input_quantity"
|
||||
android:inputType="number"
|
||||
android:textColor="@color/white"
|
||||
android:textColorHint="@color/color_66F6F6F6"
|
||||
android:textSize="@dimen/sp_9"
|
||||
app:corner="@dimen/dp_4"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/view"
|
||||
app:layout_constraintDimensionRatio="60:20"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_buy"
|
||||
app:layout_constraintTop_toTopOf="@+id/view"
|
||||
app:layout_constraintWidth_percent="0.16"
|
||||
app:solid="@color/color_365A65" />
|
||||
app:layout_constraintWidth_percent="0.16" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_buy"
|
||||
@@ -522,7 +525,8 @@
|
||||
<com.yizhuan.erban.avroom.widget.RoomEffectBoxView
|
||||
android:id="@+id/effect_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
android:layout_height="match_parent"
|
||||
tools:visibility="gone" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
@@ -699,5 +699,6 @@
|
||||
<color name="color_a974ff">#A974FF</color>
|
||||
<color name="color_A974FF">#A974FF</color>
|
||||
<color name="color_C2A66FFF">#C2A66FFF</color>
|
||||
<color name="color_306065">#306065</color>
|
||||
|
||||
</resources>
|
||||
|
@@ -5129,5 +5129,8 @@
|
||||
<string name="please_select_or_enter_the_quantity_of_hearts_purchased">請選擇或輸入購買的愛心數量</string>
|
||||
<string name="how_to_recharge_with_cs">如何儲值:</string>
|
||||
<string name="tips_cs_recharge">1.在Piko語音App內前往【我的】—【儲值鑽石】進行儲值\n2.聯繁客服獲取儲值鏈接\n客服WeChat: %s 複製\n客服Line: %s 複製\n3.如遇提示"儲值失敗,請聯系客服處理~",請添加客服進行處理</string>
|
||||
<string name="fairy_debris_not_enough_please_buy">可用碎片不足,請購買</string>
|
||||
<string name="zero">0</string>
|
||||
<string name="please_input_quantity">輸入數量</string>
|
||||
|
||||
</resources>
|
@@ -1,7 +1,7 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.7.10'
|
||||
ext.kotlin_version = '1.8.22'
|
||||
|
||||
println "\n\n\n"
|
||||
println '当前选择版本 Version Name:'+ version_name
|
||||
|
@@ -1,7 +1,7 @@
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'realm-android'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
apply plugin: 'kotlin-parcelize'
|
||||
apply from: '../mob.gradle'
|
||||
|
||||
android {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package com.yizhuan.xchat_android_core.treasurefairy
|
||||
|
||||
data class DrawInfo(
|
||||
val drawTicketNum: Int = 0,
|
||||
var drawTicketNum: Int = 0,
|
||||
val luckyNum: Int = 0,
|
||||
val needLuckyNum: Int = 0
|
||||
)
|
@@ -104,7 +104,7 @@ object TreasureFairyModel {
|
||||
api.getExchangeRecord(convertType, page, pageSize)
|
||||
}
|
||||
|
||||
suspend fun buyDebris(num: String, uid: String): String? = launchRequest {
|
||||
suspend fun buyDebris(num: Int, uid: String): String? = launchRequest {
|
||||
api.buyDebris(num, uid)
|
||||
}
|
||||
|
||||
@@ -291,7 +291,7 @@ object TreasureFairyModel {
|
||||
@FormUrlEncoded
|
||||
@POST("/act/seize-treasure/shard/buy")
|
||||
suspend fun buyDebris(
|
||||
@Field("num") num: String,
|
||||
@Field("num") num: Int,
|
||||
@Field("uid") uid: String
|
||||
): ServiceResult<String>
|
||||
|
||||
|
@@ -32,6 +32,7 @@ import com.yizhuan.xchat_android_core.room.bean.BoxSwitchVo;
|
||||
import com.yizhuan.xchat_android_core.room.bean.FindLoveSwitchVo;
|
||||
import com.yizhuan.xchat_android_core.room.bean.RoomInfo;
|
||||
import com.yizhuan.xchat_android_core.room.bean.RoomModeType;
|
||||
import com.yizhuan.xchat_android_core.room.bean.SeizeTreasureSwitchVo;
|
||||
import com.yizhuan.xchat_android_core.room.bean.SimplePartyRoomInfo;
|
||||
import com.yizhuan.xchat_android_core.room.event.RoomClearScreenEvent;
|
||||
import com.yizhuan.xchat_android_core.room.game.GameStatus;
|
||||
@@ -60,6 +61,7 @@ import java.util.Objects;
|
||||
|
||||
import io.reactivex.Single;
|
||||
import io.reactivex.processors.PublishProcessor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* <p> 全局变量,存储房间相关信息(周期与房间一样) </p>
|
||||
@@ -219,6 +221,9 @@ public final class AvRoomDataManager {
|
||||
*/
|
||||
private Map<String, Long> kickOutRoomUids;
|
||||
|
||||
@Getter
|
||||
private SeizeTreasureSwitchVo mSeizeTreasureSwitchVo;
|
||||
|
||||
private AvRoomDataManager() {
|
||||
mRoomManagerList = new ArrayList<>();
|
||||
mRoomFixedMemberList = new ArrayList<>();
|
||||
@@ -265,6 +270,7 @@ public final class AvRoomDataManager {
|
||||
mCurrentRoomInfo = roomInfo;
|
||||
mBoxSwitchVo = roomInfo.boxSwitchVo;
|
||||
mFindLoveSwitchVo = roomInfo.findLoveDrawSwitchVo;
|
||||
mSeizeTreasureSwitchVo = roomInfo.seizeTreasureSwitchVo;
|
||||
phrases = roomInfo.getSpeakTemplate();
|
||||
nick = roomInfo.getNick();
|
||||
gender = roomInfo.getGender();
|
||||
|
@@ -110,6 +110,8 @@ public class RoomInfo implements Parcelable,Serializable {
|
||||
|
||||
public FindLoveSwitchVo findLoveDrawSwitchVo;
|
||||
|
||||
public SeizeTreasureSwitchVo seizeTreasureSwitchVo;
|
||||
|
||||
private String singingMusicName;
|
||||
// 限制类型
|
||||
public static final String LOCK = "lock";//密码可进
|
||||
|
@@ -0,0 +1,10 @@
|
||||
package com.yizhuan.xchat_android_core.room.bean
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
import java.io.Serializable
|
||||
|
||||
@Parcelize
|
||||
data class SeizeTreasureSwitchVo(
|
||||
val price: Int
|
||||
): Serializable, Parcelable
|
@@ -76,7 +76,7 @@ dependencies {
|
||||
def qiniu = "8.4.4"
|
||||
def SmartRefreshLayoutVersion = "1.0.3"
|
||||
def eventbusVersion = "3.0.0"
|
||||
def fragment_version = "1.3.6"
|
||||
def fragment_version = "1.6.1"
|
||||
def GlideTransformationsVersion = "3.0.1"
|
||||
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
@@ -121,7 +121,7 @@ dependencies {
|
||||
api "com.qiniu:qiniu-android-sdk:${qiniu}"
|
||||
|
||||
api "org.greenrobot:eventbus:${eventbusVersion}"
|
||||
api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
api "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
|
||||
api 'com.github.getActivity:ToastUtils:10.5'
|
||||
|
||||
|
@@ -1,6 +1,5 @@
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
|
||||
android {
|
||||
compileSdkVersion COMPILE_SDK_VERSION.toInteger()
|
||||
|
Reference in New Issue
Block a user