失败activity
This commit is contained in:
parent
de9f003d26
commit
cb1e475a83
|
|
@ -22,9 +22,17 @@ class WithdrawFailDialog(context: Context) : BindingDialog<ViewBinding>(context,
|
||||||
setCanCancel(false)
|
setCanCancel(false)
|
||||||
|
|
||||||
mBinding.run {
|
mBinding.run {
|
||||||
setOnClickBatch(tvConfirm, ivClose) {
|
setOnClickBatch(tvActionFeedback, tvActionConfirm, ivClose) {
|
||||||
when (this) {
|
when (this) {
|
||||||
tvConfirm, ivClose -> {
|
ivClose -> {
|
||||||
|
dismiss()
|
||||||
|
}
|
||||||
|
|
||||||
|
tvActionFeedback -> {
|
||||||
|
gotoFeedback()
|
||||||
|
}
|
||||||
|
|
||||||
|
tvActionConfirm -> {
|
||||||
dismiss()
|
dismiss()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -32,8 +40,9 @@ class WithdrawFailDialog(context: Context) : BindingDialog<ViewBinding>(context,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun gotoWatchVideo() {
|
|
||||||
ownerActivity?.let { Router.Withdraw.startActivity(it) }
|
private fun gotoFeedback() {
|
||||||
|
ownerActivity?.let { Router.Feedback.startActivity(it) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ import com.ama.core.architecture.widget.BindingDialog
|
||||||
import com.gamedog.vididin.R
|
import com.gamedog.vididin.R
|
||||||
import com.gamedog.vididin.databinding.DialogWithdrawWatchAdBinding as ViewBinding
|
import com.gamedog.vididin.databinding.DialogWithdrawWatchAdBinding as ViewBinding
|
||||||
import com.gamedog.vididin.router.Router
|
import com.gamedog.vididin.router.Router
|
||||||
|
import kotlin.random.Random
|
||||||
|
|
||||||
|
|
||||||
class WithdrawWatchAdDialog(context: Context) : BindingDialog<ViewBinding>(context, ViewBinding::inflate) {
|
class WithdrawWatchAdDialog(context: Context) : BindingDialog<ViewBinding>(context, ViewBinding::inflate) {
|
||||||
|
|
@ -47,6 +48,7 @@ class WithdrawWatchAdDialog(context: Context) : BindingDialog<ViewBinding>(conte
|
||||||
// TODO -
|
// TODO -
|
||||||
//ownerActivity?.let { Router.Withdraw.startActivity(it) }
|
//ownerActivity?.let { Router.Withdraw.startActivity(it) }
|
||||||
|
|
||||||
|
WithdrawFailDialog(context).show()
|
||||||
WithdrawSuccessDialog(context).show()
|
WithdrawSuccessDialog(context).show()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape android:shape="rectangle"
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<stroke android:width="2dp" android:color="#ff333333" />
|
||||||
|
<corners android:topLeftRadius="42dp" android:topRightRadius="42dp" android:bottomLeftRadius="42dp" android:bottomRightRadius="42dp" />
|
||||||
|
</shape>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape android:shape="rectangle"
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<solid android:color="#ff333333" />
|
||||||
|
<corners android:topLeftRadius="42dp" android:topRightRadius="42dp" android:bottomLeftRadius="42dp" android:bottomRightRadius="42dp" />
|
||||||
|
</shape>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<FrameLayout
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
android:layout_width="270dp"
|
||||||
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content">
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:clipChildren="false">
|
||||||
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
|
@ -13,64 +14,104 @@
|
||||||
android:layout_gravity="end"
|
android:layout_gravity="end"
|
||||||
android:src="@mipmap/icon_close_with_circle"
|
android:src="@mipmap/icon_close_with_circle"
|
||||||
android:layout_marginEnd="30dp"
|
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="@drawable/bg_benefit_top_white"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintDimensionRatio="h, 900:1026"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
android:src="@mipmap/icon_withdraw_fail"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="15dp"
|
|
||||||
android:layout_marginTop="60dp"
|
|
||||||
android:clipChildren="false"
|
|
||||||
android:gravity="center_horizontal"
|
android:gravity="center_horizontal"
|
||||||
android:background="@drawable/bg_benefit_top_white"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
>
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
android:layout_marginTop="90dp"
|
||||||
|
android:layout_marginHorizontal="30dp">
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/tv_title"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:textSize="18sp"
|
android:textSize="18sp"
|
||||||
android:textColor="@color/black_28"
|
android:textStyle="bold"
|
||||||
android:text="@string/zero_buy_rule_dialog_title"
|
android:textColor="@color/gray3"
|
||||||
|
android:text="@string/withdraw_fail_title"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/tv_desc"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="15dp"
|
android:layout_marginTop="10dp"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
|
android:textStyle="bold"
|
||||||
android:textColor="@color/gray6"
|
android:textColor="@color/gray6"
|
||||||
android:text="@string/zero_buy_rule_dialog_descript"
|
android:text="@string/withdraw_fail_desc"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
|
||||||
android:id="@+id/tv_rules_1"
|
</LinearLayout>
|
||||||
android:layout_width="wrap_content"
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
android:orientation="horizontal"
|
||||||
android:textSize="14sp"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
android:textColor="@color/gray9"
|
android:layout_marginHorizontal="30dp"
|
||||||
android:text="@string/zero_buy_rule_dialog_rule"
|
android:layout_marginBottom="40dp" >
|
||||||
/>
|
|
||||||
|
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatTextView
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
android:id="@+id/tv_confirm"
|
android:id="@+id/tv_action_feedback"
|
||||||
android:layout_width="240dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="50dp"
|
android:layout_height="50dp"
|
||||||
android:layout_marginTop="20dp"
|
android:layout_weight="1"
|
||||||
android:background="@drawable/bg_but_zero_buy_dialog"
|
|
||||||
android:textSize="18sp"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:text="@string/understood"
|
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
android:background="@drawable/bg_withdraw_failed_but_left"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:textColor="@color/gray3"
|
||||||
|
android:text="@string/feedback"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<androidx.appcompat.widget.AppCompatTextView
|
||||||
|
android:id="@+id/tv_action_confirm"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_marginStart="20dp"
|
||||||
|
android:background="@drawable/bg_withdraw_failed_but_right"
|
||||||
|
android:textSize="18sp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:text="@string/confirm"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
</FrameLayout>
|
</FrameLayout>
|
||||||
|
|
@ -88,6 +88,8 @@
|
||||||
<string name="success">Sucesso!</string>
|
<string name="success">Sucesso!</string>
|
||||||
<string name="withdraw_success_hint">Parabéns! Você realizou o saque com sucesso!</string>
|
<string name="withdraw_success_hint">Parabéns! Você realizou o saque com sucesso!</string>
|
||||||
<string name="confirm">Confirmar</string>
|
<string name="confirm">Confirmar</string>
|
||||||
|
<string name="withdraw_fail_title">Falha no saque</string>
|
||||||
|
<string name="withdraw_fail_desc"><![CDATA[Infelizmente, a conta que você inseriu está incorreta e o saque falhou. Clique no botão abaixo para corrigir a conta.]]></string>
|
||||||
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
Loading…
Reference in New Issue