提现数值 传递
This commit is contained in:
parent
5a15d7d997
commit
3eb186063f
|
|
@ -85,7 +85,8 @@ class WithDrawActivity : AppViewsActivity<ViewBinding, UiState, ViewModel>(), On
|
|||
tvSacar -> {
|
||||
val hasBindBank = AccountManager.hasValidBankInfo()
|
||||
if (!hasBindBank) {
|
||||
WithdrawBindBankDialog(this@WithDrawActivity).show()
|
||||
WithdrawBindBankDialog(this@WithDrawActivity)
|
||||
.setWithDrawCashNum(mItemViewList.get(mCurSelectedIndex).getCashNum()).show()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import android.content.Context
|
|||
import android.text.Editable
|
||||
import android.text.TextWatcher
|
||||
import androidx.core.view.isVisible
|
||||
import com.ama.core.architecture.util.ResUtil
|
||||
import com.ama.core.architecture.util.setOnClickBatch
|
||||
import com.ama.core.architecture.widget.BindingDialog
|
||||
import com.gamedog.vididin.R
|
||||
|
|
@ -15,6 +16,8 @@ import com.gamedog.vididin.databinding.DialogWithdrawBindingBankBinding as ViewB
|
|||
|
||||
class WithdrawBindBankDialog(context: Context) : BindingDialog<ViewBinding>(context, ViewBinding::inflate) {
|
||||
|
||||
private var mWithdrawCashNum: Float = 0F
|
||||
|
||||
init {
|
||||
build()
|
||||
}
|
||||
|
|
@ -35,7 +38,7 @@ class WithdrawBindBankDialog(context: Context) : BindingDialog<ViewBinding>(cont
|
|||
|
||||
tvConfirm -> {
|
||||
saveBankAccount(mBinding.tvCpfEdit.text.toString().trim())
|
||||
WithdrawInfoConfirmDialog(context).show()
|
||||
WithdrawInfoConfirmDialog(context).setWithDrawCashNum(mWithdrawCashNum).show()
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
|
|
@ -98,5 +101,10 @@ class WithdrawBindBankDialog(context: Context) : BindingDialog<ViewBinding>(cont
|
|||
}
|
||||
|
||||
|
||||
fun setWithDrawCashNum(withdrawNum: Float): WithdrawBindBankDialog {
|
||||
mWithdrawCashNum = withdrawNum
|
||||
return this
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,14 +2,19 @@ package com.gamedog.vididin.features.withdraw
|
|||
|
||||
|
||||
import android.content.Context
|
||||
import com.ama.core.architecture.util.ResUtil
|
||||
import com.ama.core.architecture.util.setOnClickBatch
|
||||
import com.ama.core.architecture.widget.BindingDialog
|
||||
import com.gamedog.vididin.R
|
||||
import com.gamedog.vididin.core.login.login.AccountManager
|
||||
import com.gamedog.vididin.databinding.DialogWithdrawInfoConfirmBinding as ViewBinding
|
||||
import com.gamedog.vididin.router.Router
|
||||
|
||||
|
||||
class WithdrawInfoConfirmDialog(context: Context) : BindingDialog<ViewBinding>(context, ViewBinding::inflate) {
|
||||
|
||||
private var mWithdrawCashNum: Float = 0F
|
||||
|
||||
init {
|
||||
build()
|
||||
}
|
||||
|
|
@ -40,11 +45,24 @@ class WithdrawInfoConfirmDialog(context: Context) : BindingDialog<ViewBinding>(c
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
private fun gotoWatchVideo() {
|
||||
ownerActivity?.let { Router.Withdraw.startActivity(it) }
|
||||
}
|
||||
|
||||
|
||||
fun setWithDrawCashNum(withdrawNum: Float): WithdrawInfoConfirmDialog {
|
||||
mWithdrawCashNum = withdrawNum
|
||||
|
||||
mBinding.tvCashNum.text = buildString {
|
||||
append(ResUtil.getString(R.string.cash))
|
||||
append(" ")
|
||||
append(mWithdrawCashNum)
|
||||
}
|
||||
mBinding.tvCpfAccount.text = AccountManager.getBankInfo()?.bankAccount
|
||||
|
||||
return this
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,5 +54,9 @@ class WithDrawItemView @JvmOverloads constructor(
|
|||
mBinding.root.setBackgroundResource(if (mIsSelected) R.drawable.withdraw_item_bg_selected else R.drawable.withdraw_item_bg_unselected)
|
||||
}
|
||||
|
||||
fun getCashNum(): Float {
|
||||
return mCashNum
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue