Commit dfb82746 authored by 王雪伟's avatar 王雪伟

[提交人]:王雪伟

[提交简述] :小象省钱
[实现方案] :加入优惠券弹窗
parent 01ac5f02
package com.zxbw.modulemain.activity package com.zxbw.modulemain.activity
import android.app.Dialog
import android.graphics.Paint import android.graphics.Paint
import android.os.Handler import android.os.Handler
import android.util.Log import android.util.Log
......
...@@ -447,6 +447,25 @@ object DialogUtils { ...@@ -447,6 +447,25 @@ object DialogUtils {
mDialog.show() mDialog.show()
} }
//话费提示
fun showHuafeiTips(context: Activity?) {
if (context == null) return
val mDialog = Dialog(context, R.style.CenterCompatDialogTheme)
val mDialogView =
showBottomDialog(
R.layout.dialog_layout_huafei_youhui_tishi,
context,
mDialog,
0,
Gravity.CENTER
)
mDialog.setCanceledOnTouchOutside(true)
mDialog.setCancelable(true)
mDialog.show()
}
interface OnFetchCardListener { interface OnFetchCardListener {
fun onSelectCoupons(coupons: CouponsEntity?); fun onSelectCoupons(coupons: CouponsEntity?);
} }
...@@ -495,14 +514,14 @@ object DialogUtils { ...@@ -495,14 +514,14 @@ object DialogUtils {
} }
} }
if (defaultCoupon == null) { if (defaultCoupon == null) {
huafeiCouponsAdapter.setSelectPos(-1,originalPrice) huafeiCouponsAdapter.setSelectPos(-1, originalPrice)
btnBg.setBackgroundResource(R.drawable.icon_huafei_bottom_bg_unselect) btnBg.setBackgroundResource(R.drawable.icon_huafei_bottom_bg_unselect)
btnTv.setTextColor(Color.parseColor("#999999")) btnTv.setTextColor(Color.parseColor("#999999"))
btnTv.text = "暂不使用" btnTv.text = "暂不使用"
} else { } else {
for (i in result.indices) { for (i in result.indices) {
if (defaultCoupon.id == result[i].id) { if (defaultCoupon.id == result[i].id) {
huafeiCouponsAdapter.setSelectPos(i,originalPrice) huafeiCouponsAdapter.setSelectPos(i, originalPrice)
btnBg.setBackgroundResource(R.drawable.icon_huafei_bottom_bg) btnBg.setBackgroundResource(R.drawable.icon_huafei_bottom_bg)
btnTv.setTextColor(Color.parseColor("#F8E8CC")) btnTv.setTextColor(Color.parseColor("#F8E8CC"))
btnTv.text = "立即支付" btnTv.text = "立即支付"
......
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center">
<ImageView
android:layout_width="wrap_content"
android:src="@drawable/img_huafeu_tishi_bg"
android:layout_height="wrap_content"/>
</LinearLayout>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment