提现观看视频dialog-1
This commit is contained in:
parent
3eb186063f
commit
88c2d8cf34
|
|
@ -48,4 +48,12 @@ object BankUtil {
|
|||
val remainder = sum % 11
|
||||
return if (remainder < 2) 0 else 11 - remainder
|
||||
}
|
||||
|
||||
|
||||
private fun executeWithDraw() {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -84,9 +84,11 @@ class WithDrawActivity : AppViewsActivity<ViewBinding, UiState, ViewModel>(), On
|
|||
when(this) {
|
||||
tvSacar -> {
|
||||
val hasBindBank = AccountManager.hasValidBankInfo()
|
||||
val cashNum = mItemViewList.get(mCurSelectedIndex).getCashNum()
|
||||
if (!hasBindBank) {
|
||||
WithdrawBindBankDialog(this@WithDrawActivity)
|
||||
.setWithDrawCashNum(mItemViewList.get(mCurSelectedIndex).getCashNum()).show()
|
||||
WithdrawBindBankDialog(this@WithDrawActivity).setWithDrawCashNum(cashNum).show()
|
||||
} else {
|
||||
WithdrawInfoConfirmDialog(context).setWithDrawCashNum(cashNum).show()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,68 @@
|
|||
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.DialogWithdrawWatchAdBinding as ViewBinding
|
||||
import com.gamedog.vididin.router.Router
|
||||
|
||||
|
||||
class WithdrawWatchAdDialog(context: Context) : BindingDialog<ViewBinding>(context, ViewBinding::inflate) {
|
||||
|
||||
private var mWithdrawCashNum: Float = 0F
|
||||
|
||||
init {
|
||||
build()
|
||||
}
|
||||
|
||||
|
||||
private fun build() {
|
||||
with()
|
||||
setCenter()
|
||||
setMaskValue(0.8f)
|
||||
setCanCancel(false)
|
||||
|
||||
mBinding.run {
|
||||
setOnClickBatch(tvActionAlter, tvActionApply, ivClose) {
|
||||
when (this) {
|
||||
ivClose -> {
|
||||
dismiss()
|
||||
}
|
||||
|
||||
tvActionAlter -> {
|
||||
dismiss()
|
||||
}
|
||||
|
||||
tvActionApply -> {
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private fun gotoWatchVideo() {
|
||||
ownerActivity?.let { Router.Withdraw.startActivity(it) }
|
||||
}
|
||||
|
||||
|
||||
fun setWithDrawCashNum(withdrawNum: Float): WithdrawWatchAdDialog {
|
||||
mWithdrawCashNum = withdrawNum
|
||||
|
||||
mBinding.tvCashNum.text = buildString {
|
||||
append(ResUtil.getString(R.string.cash))
|
||||
append(" ")
|
||||
append(mWithdrawCashNum)
|
||||
}
|
||||
mBinding.tvCpfAccount.text = AccountManager.getBankInfo()?.bankAccount
|
||||
|
||||
return this
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,257 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="300dp"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:clipChildren="false">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_close"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_gravity="end"
|
||||
android:src="@mipmap/icon_close_with_circle"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:layout_marginTop="10dp"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="60dp"
|
||||
>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:src="@mipmap/bg_withdraw_info_confirm_dialog"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintDimensionRatio="h, 900:1026"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:layout_marginTop="40dp"
|
||||
android:layout_marginHorizontal="30dp">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/gray3"
|
||||
android:text="@string/withdraw_confirm_bank_name_title"
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_bank_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/green_ad"
|
||||
android:drawableStart="@mipmap/pix_small"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="26dp">
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/gray3"
|
||||
android:text="@string/withdraw_confirm_auth_type"
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_auth_type"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/gray6"
|
||||
android:text="@string/cpf"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="26dp">
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/gray3"
|
||||
android:text="@string/withdraw_confirm_bank_account"
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_cpf_account"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/green_39"
|
||||
android:text=""
|
||||
/>
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="26dp">
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="15sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/gray3"
|
||||
android:text="@string/withdraw_confirm_cash_num"
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_cash_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/green_39"
|
||||
android:text="@string/cash"
|
||||
/>
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginHorizontal="30dp"
|
||||
android:layout_marginBottom="40dp" >
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_action_alter"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_weight="1"
|
||||
android:paddingHorizontal="14dp"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/bg_withdraw_confirm_but_left"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@color/blue_f9"
|
||||
android:text="@string/alter"
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_action_apply"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_marginStart="20dp"
|
||||
android:background="@drawable/bg_but_zero_buy_dialog"
|
||||
android:textSize="18sp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/white"
|
||||
android:text="@string/apply"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@mipmap/withdraw_info_confirm_title"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="50dp"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="15dp"
|
||||
android:layout_marginTop="60dp"
|
||||
android:clipChildren="false"
|
||||
android:gravity="center_horizontal"
|
||||
android:background="@drawable/bg_benefit_top_white"
|
||||
>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@color/black_28"
|
||||
android:text="@string/zero_buy_rule_dialog_title"
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_desc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/gray6"
|
||||
android:text="@string/zero_buy_rule_dialog_descript"
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_rules_1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@color/gray9"
|
||||
android:text="@string/zero_buy_rule_dialog_rule"
|
||||
/>
|
||||
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tv_confirm"
|
||||
android:layout_width="240dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@drawable/bg_but_zero_buy_dialog"
|
||||
android:textSize="18sp"
|
||||
android:textColor="@color/white"
|
||||
android:text="@string/understood"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
-->
|
||||
|
||||
</FrameLayout>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 256 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 39 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
Loading…
Reference in New Issue