bug修复 10
This commit is contained in:
parent
333e7616de
commit
c2bb7ec0e7
|
|
@ -156,6 +156,7 @@ class WithDrawActivity : AppViewsEmptyViewModelActivity<ViewBinding>() {
|
||||||
showTransactionResultDialog(record)
|
showTransactionResultDialog(record)
|
||||||
}
|
}
|
||||||
updateUICashTotal()
|
updateUICashTotal()
|
||||||
|
mItemViewList[record.itemIndex].updateProgressUI()
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
e.printStackTrace()
|
e.printStackTrace()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import android.util.AttributeSet
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.widget.LinearLayout
|
import android.widget.LinearLayout
|
||||||
import com.ama.core.architecture.util.ResUtil
|
import com.ama.core.architecture.util.ResUtil
|
||||||
|
import com.gamedog.vididin.manager.WithdrawManager
|
||||||
import com.vididin.real.money.game.R
|
import com.vididin.real.money.game.R
|
||||||
import com.vididin.real.money.game.databinding.WithdrawItemViewBinding as ViewBinding
|
import com.vididin.real.money.game.databinding.WithdrawItemViewBinding as ViewBinding
|
||||||
|
|
||||||
|
|
@ -34,6 +35,8 @@ class WithDrawItemView @JvmOverloads constructor(
|
||||||
mBinding.tvSacar.setOnClickListener {
|
mBinding.tvSacar.setOnClickListener {
|
||||||
clickAction.invoke(mItemIndex)
|
clickAction.invoke(mItemIndex)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateProgressUI()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -41,5 +44,14 @@ class WithDrawItemView @JvmOverloads constructor(
|
||||||
return mCashNum
|
return mCashNum
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun updateProgressUI() {
|
||||||
|
val progressIntNum: Float = WithdrawManager.instance().getHasWithdrawSuccessCashCount(mItemIndex)
|
||||||
|
|
||||||
|
with(mBinding) {
|
||||||
|
progressBar.setProgress(progressIntNum.toInt())
|
||||||
|
tvProgress.text = String.format("%.2f", progressIntNum).toString() + ResUtil.getString(R.string.percent)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -125,6 +125,16 @@ class WithdrawManager private constructor() {
|
||||||
return count
|
return count
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun getHasWithdrawSuccessCashCount(itemIndex: Int): Float {
|
||||||
|
var count = 0F
|
||||||
|
for (record in mRecordList) {
|
||||||
|
if (record.state == TRANSACTION_STATE_SUCCESS && record.itemIndex == itemIndex) {
|
||||||
|
count += record.cashNum
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return count
|
||||||
|
}
|
||||||
|
|
||||||
fun addAdEarnForSubBean(itemIndex: Int, selectedSubIndex: Int, earnMoneyNum: Float) : Boolean {
|
fun addAdEarnForSubBean(itemIndex: Int, selectedSubIndex: Int, earnMoneyNum: Float) : Boolean {
|
||||||
if (itemIndex >= 0 && itemIndex < mItemList.size) {
|
if (itemIndex >= 0 && itemIndex < mItemList.size) {
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue