没有足够金钱提示
This commit is contained in:
parent
97344d2604
commit
80812b5a2c
|
|
@ -31,6 +31,7 @@ object VididinEvents {
|
|||
const val Event_AD_TASK_TYPE_Complement = 804
|
||||
const val Event_AD_TASK_TYPE_BOX_TASK = 805
|
||||
const val Event_AD_TASK_EARN_DIAMOND = 806
|
||||
const val Event_AD_TASK_WITHDRAW = 807
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.gamedog.vididin.features.withdraw
|
|||
|
||||
|
||||
import android.app.Activity
|
||||
import com.ama.core.architecture.util.AndroidUtil
|
||||
import com.ama.core.architecture.util.ResUtil
|
||||
import com.ama.core.architecture.util.setOnClickBatch
|
||||
import com.ama.core.architecture.widget.BindingDialog
|
||||
|
|
@ -11,7 +12,7 @@ import com.vididin.real.money.game.databinding.DialogWithdrawInfoConfirmBinding
|
|||
import com.gamedog.vididin.router.Router
|
||||
|
||||
|
||||
class WithdrawInfoConfirmDialog(context: Activity) : BindingDialog<ViewBinding>(context, ViewBinding::inflate) {
|
||||
class WithdrawInfoConfirmDialog(context: Activity, ) : BindingDialog<ViewBinding>(context, ViewBinding::inflate) {
|
||||
|
||||
private var mWithdrawCashNum: Float = 0F
|
||||
|
||||
|
|
@ -38,7 +39,14 @@ class WithdrawInfoConfirmDialog(context: Activity) : BindingDialog<ViewBinding>(
|
|||
}
|
||||
|
||||
tvActionApply -> {
|
||||
WithdrawWatchAdDialog(mActivity).show()
|
||||
AccountManager.getAccount()?.cashCount?.let {
|
||||
if (it < mWithdrawCashNum) {
|
||||
AndroidUtil.showToast(R.string.not_enough_cash)
|
||||
} else {
|
||||
WithdrawWatchAdDialog(mActivity, mWithdrawCashNum).show()
|
||||
}
|
||||
}
|
||||
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,13 +4,14 @@ package com.gamedog.vididin.features.withdraw
|
|||
import android.app.Activity
|
||||
import com.ama.core.architecture.util.setOnClickBatch
|
||||
import com.ama.core.architecture.widget.BindingDialog
|
||||
import com.gamedog.vididin.VididinEvents
|
||||
import com.gamedog.vididin.router.Router
|
||||
import com.vididin.real.money.game.R
|
||||
import com.vididin.real.money.game.databinding.DialogWithdrawWatchAdBinding as ViewBinding
|
||||
|
||||
|
||||
class WithdrawWatchAdDialog(context: Activity) : BindingDialog<ViewBinding>(context, ViewBinding::inflate) {
|
||||
class WithdrawWatchAdDialog(context: Activity, private var mWithdrawCashNum: Float) : BindingDialog<ViewBinding>(context, ViewBinding::inflate) {
|
||||
|
||||
private var mWithdrawCashNum: Float = 0F
|
||||
|
||||
init {
|
||||
build()
|
||||
|
|
@ -25,6 +26,7 @@ class WithdrawWatchAdDialog(context: Activity) : BindingDialog<ViewBinding>(cont
|
|||
|
||||
mBinding.run {
|
||||
progressBar.setBarColor(R.color.blue_ba, R.color.blue_ff)
|
||||
tvCashNum.text = mWithdrawCashNum.toString()
|
||||
|
||||
setOnClickBatch(flAction, ivClose) {
|
||||
when (this) {
|
||||
|
|
@ -43,8 +45,7 @@ class WithdrawWatchAdDialog(context: Activity) : BindingDialog<ViewBinding>(cont
|
|||
|
||||
|
||||
private fun gotoWatchVideo() {
|
||||
// TODO -
|
||||
//Router.Withdraw.startActivity(mActivity)
|
||||
Router.WatchAd.startActivity(mActivity, VididinEvents.Event_AD_TASK_WITHDRAW, null)
|
||||
|
||||
WithdrawFailDialog(mActivity).show()
|
||||
WithdrawSuccessDialog(mActivity).show()
|
||||
|
|
|
|||
|
|
@ -122,5 +122,6 @@
|
|||
<string name="has_joined_zerobuy">You have participated this activity.</string>
|
||||
<string name="no_data_hint">There\'s no any record</string>
|
||||
<string name="get">Get</string>
|
||||
<string name="not_enough_cash">You don\'t have enough cash.</string>
|
||||
|
||||
</resources>
|
||||
Loading…
Reference in New Issue