Compare commits

..

No commits in common. "333e7616de4b5d053693d79f7e7a7b49ecd721b2" and "8c9dd062956b788faed74bf3f3253ba97696e8d1" have entirely different histories.

4 changed files with 8 additions and 40 deletions

View File

@ -14,7 +14,6 @@ import com.ama.core.architecture.highlightpro.parameter.Constraints
import com.ama.core.architecture.highlightpro.parameter.HighlightParameter
import com.ama.core.architecture.highlightpro.parameter.MarginOffset
import com.ama.core.architecture.highlightpro.shape.RectShape
import com.ama.core.architecture.util.ResUtil
import com.ama.core.architecture.util.ResUtil.dp
import com.ama.core.architecture.util.SpUtil
import com.ama.core.architecture.util.setOnClickBatch
@ -129,14 +128,8 @@ class WithDrawActivity : AppViewsEmptyViewModelActivity<ViewBinding>() {
private fun updateUICashTotal() {
binding.tvCashTotal.text = AccountManager.getCash().toString()
binding.tvAllCashHasWithdrawed.text = buildString {
append(ResUtil.getString(R.string.cash))
append(" ")
append(WithdrawManager.instance().getHasWithdrawSuccessCashCount())
}
}
override fun ViewBinding.initListeners() {
registerEvents({ data->
when (data?.mEventType) {
@ -155,7 +148,6 @@ class WithDrawActivity : AppViewsEmptyViewModelActivity<ViewBinding>() {
if (record.itemIndex == 0) {
showTransactionResultDialog(record)
}
updateUICashTotal()
} catch (e: Exception) {
e.printStackTrace()
}

View File

@ -30,7 +30,7 @@ class WithDrawItemView @JvmOverloads constructor(
fun setNumAndAction(itemIndex: Int, cashNum: Float, clickAction: (Int)->Unit) {
mItemIndex = itemIndex
mCashNum = cashNum
mBinding.tvWithdrawNum.text = ResUtil.getString(R.string.cash) + " " + cashNum.toString()
mBinding.tvWithdrawNum.text = ResUtil.getString(R.string.cash) + cashNum.toString()
mBinding.tvSacar.setOnClickListener {
clickAction.invoke(mItemIndex)
}

View File

@ -115,16 +115,6 @@ class WithdrawManager private constructor() {
}
fun getHasWithdrawSuccessCashCount(): Float {
var count = 0F
for (record in mRecordList) {
if (record.state == TRANSACTION_STATE_SUCCESS) {
count += record.cashNum
}
}
return count
}
fun addAdEarnForSubBean(itemIndex: Int, selectedSubIndex: Int, earnMoneyNum: Float) : Boolean {
if (itemIndex >= 0 && itemIndex < mItemList.size) {
try {

View File

@ -46,29 +46,15 @@
android:layout_centerVertical="true"
/>
<LinearLayout
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_alignParentRight="true">
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:textColor="@color/black_13"
android:text="@string/total_cash"
/>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_all_cash_has_withdrawed"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14sp"
android:textColor="@color/black_13"
/>
</LinearLayout>
android:textSize="14sp"
android:textColor="@color/black_13"
android:text="@string/total_cash"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
/>
</RelativeLayout>