Compare commits
No commits in common. "333e7616de4b5d053693d79f7e7a7b49ecd721b2" and "8c9dd062956b788faed74bf3f3253ba97696e8d1" have entirely different histories.
333e7616de
...
8c9dd06295
|
|
@ -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.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
|
||||||
|
|
@ -129,14 +128,8 @@ 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(" ")
|
|
||||||
append(WithdrawManager.instance().getHasWithdrawSuccessCashCount())
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
override fun ViewBinding.initListeners() {
|
override fun ViewBinding.initListeners() {
|
||||||
registerEvents({ data->
|
registerEvents({ data->
|
||||||
when (data?.mEventType) {
|
when (data?.mEventType) {
|
||||||
|
|
@ -155,7 +148,6 @@ class WithDrawActivity : AppViewsEmptyViewModelActivity<ViewBinding>() {
|
||||||
if (record.itemIndex == 0) {
|
if (record.itemIndex == 0) {
|
||||||
showTransactionResultDialog(record)
|
showTransactionResultDialog(record)
|
||||||
}
|
}
|
||||||
updateUICashTotal()
|
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
e.printStackTrace()
|
e.printStackTrace()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ class WithDrawItemView @JvmOverloads constructor(
|
||||||
fun setNumAndAction(itemIndex: Int, cashNum: Float, clickAction: (Int)->Unit) {
|
fun setNumAndAction(itemIndex: Int, cashNum: Float, clickAction: (Int)->Unit) {
|
||||||
mItemIndex = itemIndex
|
mItemIndex = itemIndex
|
||||||
mCashNum = cashNum
|
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 {
|
mBinding.tvSacar.setOnClickListener {
|
||||||
clickAction.invoke(mItemIndex)
|
clickAction.invoke(mItemIndex)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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 {
|
fun addAdEarnForSubBean(itemIndex: Int, selectedSubIndex: Int, earnMoneyNum: Float) : Boolean {
|
||||||
if (itemIndex >= 0 && itemIndex < mItemList.size) {
|
if (itemIndex >= 0 && itemIndex < mItemList.size) {
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -46,29 +46,15 @@
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<LinearLayout
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:textSize="14sp"
|
||||||
android:layout_alignParentRight="true">
|
android:textColor="@color/black_13"
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
android:text="@string/total_cash"
|
||||||
android:layout_width="wrap_content"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_height="wrap_content"
|
android:layout_centerVertical="true"
|
||||||
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