bug修复7
This commit is contained in:
parent
8c9dd06295
commit
189a85896a
|
|
@ -14,6 +14,7 @@ import com.ama.core.architecture.highlightpro.parameter.Constraints
|
||||||
import com.ama.core.architecture.highlightpro.parameter.HighlightParameter
|
import com.ama.core.architecture.highlightpro.parameter.HighlightParameter
|
||||||
import com.ama.core.architecture.highlightpro.parameter.MarginOffset
|
import com.ama.core.architecture.highlightpro.parameter.MarginOffset
|
||||||
import com.ama.core.architecture.highlightpro.shape.RectShape
|
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.ResUtil.dp
|
||||||
import com.ama.core.architecture.util.SpUtil
|
import com.ama.core.architecture.util.SpUtil
|
||||||
import com.ama.core.architecture.util.setOnClickBatch
|
import com.ama.core.architecture.util.setOnClickBatch
|
||||||
|
|
@ -128,8 +129,13 @@ class WithDrawActivity : AppViewsEmptyViewModelActivity<ViewBinding>() {
|
||||||
|
|
||||||
private fun updateUICashTotal() {
|
private fun updateUICashTotal() {
|
||||||
binding.tvCashTotal.text = AccountManager.getCash().toString()
|
binding.tvCashTotal.text = AccountManager.getCash().toString()
|
||||||
|
binding.tvAllCashHasWithdrawed.text = buildString {
|
||||||
|
append(ResUtil.getString(R.string.cash))
|
||||||
|
append(WithdrawManager.instance().getHasWithdrawSuccessCashCount())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
override fun ViewBinding.initListeners() {
|
override fun ViewBinding.initListeners() {
|
||||||
registerEvents({ data->
|
registerEvents({ data->
|
||||||
when (data?.mEventType) {
|
when (data?.mEventType) {
|
||||||
|
|
|
||||||
|
|
@ -115,6 +115,16 @@ 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 {
|
fun addAdEarnForSubBean(itemIndex: Int, selectedSubIndex: Int, earnMoneyNum: Float) : Boolean {
|
||||||
if (itemIndex >= 0 && itemIndex < mItemList.size) {
|
if (itemIndex >= 0 && itemIndex < mItemList.size) {
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -46,15 +46,29 @@
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="14sp"
|
android:orientation="horizontal"
|
||||||
android:textColor="@color/black_13"
|
android:layout_alignParentRight="true">
|
||||||
android:text="@string/total_cash"
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:layout_alignParentRight="true"
|
android:layout_width="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
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>
|
||||||
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue