diff --git a/app/build.gradle b/app/build.gradle
index be248ca..4431e50 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -28,9 +28,9 @@ android {
applicationId "com.abbidot.tracker"
minSdkVersion 24
targetSdkVersion 35
- versionCode 2502
-// versionName "2.5.2"
- versionName "2.5.2-Beta1"
+ versionCode 2600
+// versionName "2.6.0"
+ versionName "2.6.0-Beta1"
4
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 147de58..e87da8b 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -88,8 +88,7 @@
tools:targetApi="s" />
-
-
+
@@ -109,6 +108,9 @@
android:usesCleartextTraffic="true"
tools:replace="android:supportsRtl"
tools:targetApi="33">
+
diff --git a/app/src/main/java/com/abbidot/tracker/adapter/MySubscriptionAdapter.kt b/app/src/main/java/com/abbidot/tracker/adapter/MySubscriptionAdapter.kt
index af097f3..fb4b018 100644
--- a/app/src/main/java/com/abbidot/tracker/adapter/MySubscriptionAdapter.kt
+++ b/app/src/main/java/com/abbidot/tracker/adapter/MySubscriptionAdapter.kt
@@ -18,6 +18,7 @@ import com.abbidot.tracker.ui.activity.subscribe.ChoosePlanActivity
import com.abbidot.tracker.ui.activity.subscribe.MySubscriptionActivity
import com.abbidot.tracker.ui.activity.subscribe.SubscriptionHistoryActivity
import com.abbidot.tracker.ui.activity.subscribe.SubscriptionPlanActivity
+import com.abbidot.tracker.util.Util
import com.abbidot.tracker.widget.TypefaceTextView
import com.qmuiteam.qmui.skin.QMUISkinManager
import com.qmuiteam.qmui.widget.popup.QMUIPopup
@@ -44,6 +45,8 @@ class MySubscriptionAdapter(
) {
holder!!.setText(R.id.tv_my_subscription_device_out_id, item.deviceOutId)
// holder.setText(R.id.tv_my_subscription_plan_name, "${item.mealName}(${item.planCategory})")
+ holder.getImageView(R.id.iv_my_subscription_device_image)
+ .setImageResource(Util.getDeviceTypeImage(item.deviceType))
holder.setText(R.id.tv_my_subscription_plan_name, item.mealName)
holder.getTextView(R.id.tv_my_subscription_auto_subscription_tips).apply {
visibility = if (item.subscriptionStatus == ConstantInt.Open) {
@@ -174,7 +177,11 @@ class MySubscriptionAdapter(
//UserId不一样就是共享设备的订单
visibility = if (item.userId == userId) {
setOnClickListener {
- showPop(holder.getView(R.id.iv_my_subscription_btn), item, position)
+// showPop(holder.getView(R.id.iv_my_subscription_btn), item, position)
+ Intent(mContext, SubscriptionHistoryActivity::class.java).let {
+ it.putExtra(ConstantString.Id, item.subscriptionId)
+ mMySubscriptionActivity.startActivity(it)
+ }
}
View.VISIBLE
} else View.GONE
diff --git a/app/src/main/java/com/abbidot/tracker/adapter/SubscriptionHistoryAdapter.kt b/app/src/main/java/com/abbidot/tracker/adapter/SubscriptionHistoryAdapter.kt
index 7d47187..46cd4ac 100644
--- a/app/src/main/java/com/abbidot/tracker/adapter/SubscriptionHistoryAdapter.kt
+++ b/app/src/main/java/com/abbidot/tracker/adapter/SubscriptionHistoryAdapter.kt
@@ -4,21 +4,29 @@ import android.content.Context
import android.content.Intent
import android.view.View
import android.widget.TextView
+import androidx.appcompat.widget.AppCompatImageView
+import androidx.appcompat.widget.LinearLayoutCompat
+import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.RecyclerView
+import com.abbidot.baselibrary.util.LogUtil
import com.abbidot.baselibrary.util.Utils
import com.abbidot.tracker.R
import com.abbidot.tracker.bean.SubscriptionsOrderBean
import com.abbidot.tracker.constant.ConstantInt
import com.abbidot.tracker.constant.ConstantString
import com.abbidot.tracker.constant.MultipleEntity
+import com.abbidot.tracker.ui.activity.subscribe.RefundDetailsActivity
import com.abbidot.tracker.ui.activity.subscribe.RequestRefundActivity
import com.abbidot.tracker.ui.activity.subscribe.SubscriptionHistoryActivity
import com.abbidot.tracker.widget.TypefaceRoundButton
+import com.abbidot.tracker.widget.TypefaceTextView
import com.chad.library.adapter.base.BaseMultiItemQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.hjq.toast.Toaster
+import com.qmuiteam.qmui.widget.grouplist.QMUICommonListItemView
import com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButtonDrawable
+import com.stripe.android.core.AppInfo
/**
*Created by .yzq on 2024/8/19/019.
@@ -93,6 +101,7 @@ class SubscriptionHistoryAdapter(
}
private fun bindOrderData(holder: BaseViewHolder, item: SubscriptionsOrderBean) {
+ val position = getItemPosition(item)
holder.setText(
R.id.tv_subscription_history_order_id,
context.getString(R.string.txt_order_id) + item.renewNum
@@ -117,39 +126,11 @@ class SubscriptionHistoryAdapter(
visibility = View.VISIBLE
when (item.orderStatus) {
1 -> {
- if (item.isAutoRenewal == ConstantInt.Type1) {
+ if (item.subscriptionStatus == ConstantInt.Type1) {
visibility = View.GONE
} else {
setRefundState(context, item.isRefundable, this)
}
-
-// val updateTimestamp = Utils.stringToTimestamp(item.updateTime, isUtc = true)
-// val nowTimestamp = System.currentTimeMillis()
-// if (item.enabled == ConstantInt.Type0 || (item.surplusDays == 0L && item.subscriptionStatus == ConstantInt.Close)) {
-// visibility = View.GONE
-// } else if (item.mealUnit == ConstantString.PackageUnitDay) {
-// visibility = View.VISIBLE
-// setText(R.string.txt_refund)
-// } else if (item.mealUnit == ConstantString.PackageUnitMonth) {
-// val day7Timestamp = 7 * 24 * 60 * 60 * 1000L
-// //套餐超出7天不能退款
-// if (nowTimestamp - updateTimestamp <= day7Timestamp) {
-// visibility = View.VISIBLE
-// setText(R.string.txt_refund)
-// } else {
-// visibility = View.GONE
-// }
-// } else {
-// val day30Timestamp = 30 * 24 * 60 * 60 * 1000L
-// //套餐超出30天不能退款
-// if (nowTimestamp - updateTimestamp <= day30Timestamp) {
-// visibility = View.VISIBLE
-// setText(R.string.txt_refund)
-// } else {
-// visibility = View.GONE
-// }
-// }
-// setTextColor(ContextCompat.getColor(context, R.color.select_color))
}
4 -> setText(R.string.txt_waiting)
@@ -177,6 +158,7 @@ class SubscriptionHistoryAdapter(
}
}
}
+ visibility = View.GONE
}
val cTimeMillis = System.currentTimeMillis()
@@ -194,6 +176,83 @@ class SubscriptionHistoryAdapter(
if (item.annualCareType == ConstantInt.Type1) context.getString(R.string.start_txt_yes)
else context.getString(R.string.txt_no)
}
+ holder.getView(R.id.tv_subscription_history_refund_result).apply {
+ text =
+ if (item.enabled == ConstantInt.Type0) context.getString(R.string.txt_unavailable)
+ else
+ //orderStatus=0 支付取消 1支付成功 2支付失败 3待支付 4申请审核中 5退款中 6退款成功 7退款失败 8审核失败
+ when (item.orderStatus) {
+ 1 -> {
+ if (item.subscriptionStatus == ConstantInt.Type1) context.getString(R.string.txt_unavailable)
+ else if (item.isRefundable == ConstantInt.Type1) context.getString(R.string.txt_available)
+ else context.getString(R.string.txt_unavailable)
+ }
+
+ 4 -> context.getString(R.string.txt_under_review)
+ 5 -> context.getString(R.string.txt_processing)
+ 6 -> context.getString(R.string.login_txt_login_finish)
+ 7 -> context.getString(R.string.txt_failed)
+ 8 -> context.getString(R.string.txt_declined)
+ else -> context.getString(R.string.txt_unavailable)
+ }
+ }
+ holder.getView(R.id.cl_subscription_history_refund_item)
+ .setOnClickListener {
+ val intent = if (item.enabled == ConstantInt.Type0) null
+ else
+ //orderStatus=0 支付取消 1支付成功 2支付失败 3待支付 4申请审核中 5退款中 6退款成功 7退款失败 8审核失败
+ when (item.orderStatus) {
+ 1 -> {
+ if (item.subscriptionStatus == ConstantInt.Type1) null
+ else if (item.isRefundable == ConstantInt.Type1)
+ Intent(context, RequestRefundActivity::class.java)
+// Intent(context, RefundDetailsActivity::class.java)
+ else null
+ }
+
+ 4, 5, 6, 7, 8 ->
+ Intent(context, RefundDetailsActivity::class.java)
+
+ else -> null
+ }
+
+ intent?.let {
+ it.putExtra(ConstantString.SetMeal, item)
+ mHistoryActivity.startActivity(it)
+ }
+ }
+
+ holder.getView(R.id.iv_subscription_history_refund_arrow).apply {
+ visibility = if (item.enabled == ConstantInt.Type0) View.GONE
+ else when (item.orderStatus) {
+ 1 -> {
+ if (item.subscriptionStatus == ConstantInt.Type1) View.GONE
+ else if (item.isRefundable == ConstantInt.Type1) View.VISIBLE
+ else View.GONE
+ }
+
+ 4 -> View.VISIBLE
+ 5 -> View.VISIBLE
+ 6 -> View.VISIBLE
+ 7 -> View.VISIBLE
+ 8 -> View.VISIBLE
+ else -> View.GONE
+ }
+ }
+ holder.getView(R.id.tv_subscription_history_auto_renew_result).apply {
+ text =
+ if (item.subscriptionStatus == ConstantInt.Type1) context.getString(R.string.tracker_manage_set_led_on)
+ else context.getString(R.string.tracker_manage_set_led_off)
+ }
+ holder.getView(R.id.ll_subscription_history_auto_renew_item).apply {
+ visibility = if (item.enabled == ConstantInt.Type0 || (expiredTime <= 0)) View.GONE
+ else View.VISIBLE
+ setOnClickListener {
+ mHistoryActivity.updateSubscriptionStatus(
+ item.subscriptionId, item.subscriptionStatus, position
+ )
+ }
+ }
}
private fun setRefundState(
diff --git a/app/src/main/java/com/abbidot/tracker/bean/SubscriptionsOrderBean.kt b/app/src/main/java/com/abbidot/tracker/bean/SubscriptionsOrderBean.kt
index 0a8fa0d..83448e9 100644
--- a/app/src/main/java/com/abbidot/tracker/bean/SubscriptionsOrderBean.kt
+++ b/app/src/main/java/com/abbidot/tracker/bean/SubscriptionsOrderBean.kt
@@ -21,6 +21,7 @@ data class SubscriptionsOrderBean(
var customerId: String,
var deviceId: String,
var deviceOutId: String,
+ var deviceType: Int,
var enabled: Int,
var id: String,
var mealDesc: String,
@@ -40,7 +41,7 @@ data class SubscriptionsOrderBean(
var reactivation: Int,
var simId: String,
var subscriptionId: String,
- var subscriptionStatus: Int,
+ var subscriptionStatus: Int,//是否是自动续订 1:是 0:否
var surplusDays: Long,
var autoRenewPrice: Double,
var tax: Double,
@@ -56,7 +57,6 @@ data class SubscriptionsOrderBean(
var refundTime: Long,
var planTimeMonthsCount: Int,
var isRefundable: Int,//是否显示退款按钮 1:是 0:否
- var isAutoRenewal: Int,//是否是自动续订 1:是 0:否
@MultipleEntity var menuType: Int,
var renewNum: String,
var createUserId: String,//这个订单是由哪个用户创建的
@@ -71,6 +71,7 @@ data class SubscriptionsOrderBean(
"",
"",
"",
+ 1,
0,
"",
"",
@@ -106,7 +107,6 @@ data class SubscriptionsOrderBean(
0L,
0,
0,
- 0,
menuType, "", "",
0
)
@@ -120,6 +120,7 @@ data class SubscriptionsOrderBean(
"",
"",
"",
+ 1,
0,
"",
"",
@@ -155,7 +156,6 @@ data class SubscriptionsOrderBean(
0L,
0,
0,
- 0,
MultipleEntity.TEXT, "", "",
0
)
diff --git a/app/src/main/java/com/abbidot/tracker/ui/activity/subscribe/AddCreditCardPaymentActivity.kt b/app/src/main/java/com/abbidot/tracker/ui/activity/subscribe/AddCreditCardPaymentActivity.kt
index 8aef757..a85c777 100644
--- a/app/src/main/java/com/abbidot/tracker/ui/activity/subscribe/AddCreditCardPaymentActivity.kt
+++ b/app/src/main/java/com/abbidot/tracker/ui/activity/subscribe/AddCreditCardPaymentActivity.kt
@@ -134,7 +134,8 @@ class AddCreditCardPaymentActivity :
ilAddCardNameOnCard.root,
ilAddCardNumber.root,
llAddCardCvcLayout,
- llAddCardMmDdLayout, tvAddCardExperienceBtn
+ llAddCardMmDdLayout,
+ tvAddCardExperienceBtn
)
}
}
@@ -162,8 +163,7 @@ class AddCreditCardPaymentActivity :
}
override fun onRequestError(exceptionCode: String?) {
- setButtonEnabled(mRightImageButton, ConstantInt.Type1)
- setButtonEnabled(mViewBinding.btnSaveNewCreditCard, ConstantInt.Type1)
+ setBtnEnabled(ConstantInt.Type1)
}
})
}
@@ -175,8 +175,7 @@ class AddCreditCardPaymentActivity :
}
override fun onRequestError(exceptionCode: String?) {
- setButtonEnabled(mRightImageButton, ConstantInt.Type1)
- setButtonEnabled(mViewBinding.btnSaveNewCreditCard, ConstantInt.Type1)
+ setBtnEnabled(ConstantInt.Type1)
}
})
}
@@ -290,8 +289,8 @@ class AddCreditCardPaymentActivity :
// 用 PaymentMethodCreateParams 封装银行卡,不再直接new Card
val cardParams =
PaymentMethodCreateParams.Card.Builder().setNumber(cardNumber)
- .setExpiryMonth(dates[0].toInt())
- .setExpiryYear(dates[1].toInt()).setCvc(cvv).build()
+ .setExpiryMonth(dates[0].toInt()).setExpiryYear(dates[1].toInt())
+ .setCvc(cvv).build()
val paymentMethodParams = PaymentMethodCreateParams.create(cardParams)
val stripeKey = ThirdPartyUtil.instance.getStripeKey(mContext)
LogUtil.e("支付stripeKey=$stripeKey")
@@ -346,8 +345,14 @@ class AddCreditCardPaymentActivity :
}
},
getString(R.string.txt_auto_renewal_on),
- R.string.txt_turn_off_remove, R.string.txt_cancel
- )
+ R.string.txt_turn_off_remove,
+ R.string.txt_cancel,
+ cancelListener = object : BaseDialog.OnDialogCancelListener {
+ override fun onCancelClick(dialog: BaseDialog<*>) {
+ dialog.dismiss()
+ setBtnEnabled(ConstantInt.Type1)
+ }
+ })
} else {
ViewUtil.instance.showDialog(
this@AddCreditCardPaymentActivity,
@@ -359,11 +364,22 @@ class AddCreditCardPaymentActivity :
}
},
getString(R.string.txt_remove_pay_method) + if (AppUtils.isChina()) "?" else "?",
- R.string.txt_remove, R.string.txt_cancel
- )
+ R.string.txt_remove,
+ R.string.txt_cancel,
+ cancelListener = object : BaseDialog.OnDialogCancelListener {
+ override fun onCancelClick(dialog: BaseDialog<*>) {
+ dialog.dismiss()
+ setBtnEnabled(ConstantInt.Type1)
+ }
+ })
}
}
+ private fun setBtnEnabled(enabledState: Int) {
+ setButtonEnabled(mViewBinding.btnSaveNewCreditCard, enabledState)
+ setButtonEnabled(mRightImageButton, enabledState)
+ }
+
override fun onClick(v: View?) {
mViewBinding.apply {
if (v != tvAddCardExperienceBtn && isLimitClick()) return
@@ -379,8 +395,7 @@ class AddCreditCardPaymentActivity :
ilAddCardNameOnCard.root -> setClickEditViewVisible(ilAddCardNameOnCard.etInputView2Content)
ilAddCardNumber.root -> setClickEditViewVisible(ilAddCardNumber.etInputView2Content)
mRightImageButton -> {
- setButtonEnabled(btnSaveNewCreditCard, ConstantInt.Type0)
- setButtonEnabled(mRightImageButton, ConstantInt.Type0)
+ setBtnEnabled(ConstantInt.Type0)
mSubscriptionPayViewModel.getOrderAutoRenewalStatus()
}
}
@@ -390,12 +405,12 @@ class AddCreditCardPaymentActivity :
override fun onFocusChange(v: View?, hasFocus: Boolean) {
mViewBinding.apply {
when (v!!) {
- ilAddCardNameOnCard.etInputView2Content ->
- setEditViewNoFocusHide(ilAddCardNameOnCard.etInputView2Content, hasFocus)
+ ilAddCardNameOnCard.etInputView2Content -> setEditViewNoFocusHide(
+ ilAddCardNameOnCard.etInputView2Content, hasFocus
+ )
ilAddCardNumber.etInputView2Content -> setEditViewNoFocusHide(
- ilAddCardNumber.etInputView2Content,
- hasFocus
+ ilAddCardNumber.etInputView2Content, hasFocus
)
etAddCardMmDdContent -> setEditViewNoFocusHide(etAddCardMmDdContent, hasFocus)
diff --git a/app/src/main/java/com/abbidot/tracker/ui/activity/subscribe/MySubscriptionActivity.kt b/app/src/main/java/com/abbidot/tracker/ui/activity/subscribe/MySubscriptionActivity.kt
index 2b4bd4f..119a940 100644
--- a/app/src/main/java/com/abbidot/tracker/ui/activity/subscribe/MySubscriptionActivity.kt
+++ b/app/src/main/java/com/abbidot/tracker/ui/activity/subscribe/MySubscriptionActivity.kt
@@ -1,5 +1,6 @@
package com.abbidot.tracker.ui.activity.subscribe
+import android.content.Context
import androidx.activity.viewModels
import com.abbidot.baselibrary.constant.EventName
import com.abbidot.baselibrary.eventbus.XEventBus
@@ -7,6 +8,7 @@ import com.abbidot.baselibrary.util.AppUtils
import com.abbidot.tracker.R
import com.abbidot.tracker.adapter.MySubscriptionAdapter
import com.abbidot.tracker.base.BaseActivity
+import com.abbidot.tracker.base.BaseDialog
import com.abbidot.tracker.constant.ConstantInt
import com.abbidot.tracker.constant.GetResultCallback
import com.abbidot.tracker.databinding.ActivityMySubscriptionBinding
@@ -91,8 +93,20 @@ class MySubscriptionActivity :
mPosition = position
val messageId = if (0 == status) R.string.txt_auto_recharge_title
else R.string.txt_auto_recharge_content
- ViewUtil.instance.operateDialogTips(mContext, messageId) {
+ operateDialogTips(mContext, messageId) {
mSubscriptionViewModel.updateSubscriptionStatus(subscriptionId, status)
}
}
+
+ /**
+ * 操作提示框
+ */
+ private fun operateDialogTips(context: Context, messageID: Int, okCallback: () -> Unit) {
+ ViewUtil.instance.showDialog(context, messageID, object : BaseDialog.OnDialogOkListener {
+ override fun onOkClick(dialog: BaseDialog<*>) {
+ dialog.dismiss()
+ okCallback()
+ }
+ }, okTextResId = R.string.start_txt_yes)
+ }
}
\ No newline at end of file
diff --git a/app/src/main/java/com/abbidot/tracker/ui/activity/subscribe/RefundDetailsActivity.kt b/app/src/main/java/com/abbidot/tracker/ui/activity/subscribe/RefundDetailsActivity.kt
new file mode 100644
index 0000000..e65427d
--- /dev/null
+++ b/app/src/main/java/com/abbidot/tracker/ui/activity/subscribe/RefundDetailsActivity.kt
@@ -0,0 +1,184 @@
+package com.abbidot.tracker.ui.activity.subscribe
+
+import android.R.attr.visibility
+import android.os.Bundle
+import android.view.View
+import androidx.activity.enableEdgeToEdge
+import androidx.appcompat.app.AppCompatActivity
+import androidx.core.content.ContextCompat
+import androidx.core.view.ViewCompat
+import androidx.core.view.WindowInsetsCompat
+import com.abbidot.baselibrary.util.Utils
+import com.abbidot.tracker.R
+import com.abbidot.tracker.base.BaseActivity
+import com.abbidot.tracker.bean.SubscriptionsOrderBean
+import com.abbidot.tracker.constant.ConstantString
+import com.abbidot.tracker.databinding.ActivityRefundDetailsBinding
+import com.abbidot.tracker.ui.fragment.subscribe.RefundPolicyBottomSheetFragment
+import com.abbidot.tracker.util.Util
+import com.abbidot.tracker.util.ViewUtil
+import com.qmuiteam.qmui.widget.QMUITopBar
+
+class RefundDetailsActivity :
+ BaseActivity(ActivityRefundDetailsBinding::inflate) {
+
+ //套餐
+ private var mSetMealBean: SubscriptionsOrderBean? = null
+
+ override fun getTopBar() = mViewBinding.ilRefundDetailsTopBar.titleTopBar
+
+ override fun initData() {
+ super.initData()
+ setTopBarTitle(R.string.txt_refund_details)
+ setLeftBackImage(R.drawable.icon_white_back_svg)
+
+ mSetMealBean = Util.getParcelableAdaptive(
+ intent, ConstantString.SetMeal, SubscriptionsOrderBean::class.java
+ )
+
+ mViewBinding.apply {
+ mSetMealBean?.let {
+ tvRefundDetailsPlanName.text = it.mealName
+ tvRefundDetailsOrderId.text = it.renewNum
+ tvRefundDetailsRefundAmount.text =
+ String.format(getString(R.string.txt_money_unit), "${it.totalAmountWithTax}")
+ tvRefundDetailsOrderTime.text =
+ Utils.formatTime(it.payTime, Utils.DATE_FORMAT_PATTERN_CN2)
+
+ val typeface = ViewUtil.instance.setTypeface(mContext, ViewUtil.FONT_BOLD_NAME)
+ ilRefundDetailsStateStep1.tvRefundStateStepTitle.setTypeface(typeface)
+ ilRefundDetailsStateStep1.ivRefundStateStepDot.isActivated = true
+ ilRefundDetailsStateStep1.tvRefundStateStepTitle.setText(R.string.txt_request_submit)
+ ilRefundDetailsStateStep1.tvRefundStateStepDesc.setText(R.string.txt_request_submit_dec)
+ ilRefundDetailsStateStep2.tvRefundStateStepTitle.setText(R.string.txt_under_review)
+ ilRefundDetailsStateStep2.tvRefundStateStepDesc.visibility = View.GONE
+ ilRefundDetailsStateStep3.tvRefundStateStepTitle.setText(R.string.txt_refund_processing)
+ ilRefundDetailsStateStep3.tvRefundStateStepDesc.visibility = View.GONE
+ ilRefundDetailsStateStep4.tvRefundStateStepTitle.setText(R.string.txt_refund_completed)
+ ilRefundDetailsStateStep4.tvRefundStateStepDesc.visibility = View.GONE
+ ilRefundDetailsStateStep4.viewRefundStateStepLine.visibility = View.GONE
+
+ //orderStatus=0 支付取消 1支付成功 2支付失败 3待支付 4申请审核中 5退款中 6退款成功 7退款失败 8审核失败
+ when (it.orderStatus) {
+ 4 -> {
+ tvRefundDetailsStateTitle.setText(R.string.txt_refund_pending)
+ tvRefundDetailsStateContent.text =
+ getString(R.string.txt_refund_pending_tips)
+
+ ilRefundDetailsStateStep1.ivRefundStateStepDot.isSelected = true
+ ilRefundDetailsStateStep1.tvRefundStateStepDesc.text =
+ "2026年9月18日 15:40:07"
+ ilRefundDetailsStateStep2.ivRefundStateStepDot.isActivated = true
+ ilRefundDetailsStateStep2.tvRefundStateStepTitle.setTextColor(
+ ContextCompat.getColor(
+ mContext, R.color.select_color
+ )
+ )
+ ilRefundDetailsStateStep2.tvRefundStateStepTitle.setTypeface(typeface)
+ ilRefundDetailsStateStep2.tvRefundStateStepDesc.visibility = View.VISIBLE
+ ilRefundDetailsStateStep2.tvRefundStateStepDesc.setText(R.string.txt_under_review_dec)
+ }
+
+ 5 -> {
+ tvRefundDetailsStateTitle.text = getString(R.string.txt_refund_processing)
+ tvRefundDetailsStateContent.text =
+ getString(R.string.txt_refund_processing_tips)
+
+ ilRefundDetailsStateStep1.ivRefundStateStepDot.isSelected = true
+ ilRefundDetailsStateStep1.tvRefundStateStepDesc.text =
+ "2026年9月18日 15:40:07"
+ ilRefundDetailsStateStep2.ivRefundStateStepDot.isSelected = true
+ ilRefundDetailsStateStep2.tvRefundStateStepTitle.setTypeface(typeface)
+ ilRefundDetailsStateStep2.tvRefundStateStepDesc.visibility = View.VISIBLE
+ ilRefundDetailsStateStep2.tvRefundStateStepDesc.setText(R.string.txt_under_review_dec)
+ ilRefundDetailsStateStep3.tvRefundStateStepTitle.setTextColor(
+ ContextCompat.getColor(
+ mContext, R.color.select_color
+ )
+ )
+ ilRefundDetailsStateStep3.tvRefundStateStepDesc.visibility = View.VISIBLE
+ ilRefundDetailsStateStep3.tvRefundStateStepDesc.setText(R.string.txt_refund_processing_tips)
+ ilRefundDetailsStateStep3.ivRefundStateStepDot.isActivated = true
+ ilRefundDetailsStateStep3.tvRefundStateStepTitle.setTypeface(typeface)
+ }
+
+ 6 -> {
+ tvRefundDetailsStateTitle.setText(R.string.txt_refund_completed)
+ tvRefundDetailsStateContent.setText(R.string.txt_refund_success_tips)
+
+ ilRefundDetailsStateStep1.ivRefundStateStepDot.isSelected = true
+ ilRefundDetailsStateStep1.tvRefundStateStepDesc.text =
+ "2026年9月18日 15:40:07"
+ ilRefundDetailsStateStep2.ivRefundStateStepDot.isSelected = true
+ ilRefundDetailsStateStep2.tvRefundStateStepTitle.setTypeface(typeface)
+ ilRefundDetailsStateStep2.tvRefundStateStepDesc.visibility = View.VISIBLE
+ ilRefundDetailsStateStep2.tvRefundStateStepDesc.setText(R.string.txt_under_review_dec)
+ ilRefundDetailsStateStep3.tvRefundStateStepDesc.visibility = View.VISIBLE
+ ilRefundDetailsStateStep3.tvRefundStateStepDesc.setText(R.string.txt_refund_processing_tips)
+ ilRefundDetailsStateStep3.ivRefundStateStepDot.isSelected = true
+ ilRefundDetailsStateStep3.tvRefundStateStepTitle.setTypeface(typeface)
+ ilRefundDetailsStateStep4.ivRefundStateStepDot.isSelected = true
+ ilRefundDetailsStateStep4.tvRefundStateStepTitle.setTypeface(typeface)
+ ilRefundDetailsStateStep4.tvRefundStateStepDesc.visibility = View.VISIBLE
+ ilRefundDetailsStateStep4.tvRefundStateStepDesc.setText(R.string.txt_refund_success_tips)
+ }
+
+ 7 -> {
+ tvRefundDetailsStateTitle.setText(R.string.txt_refund_unsuccessful)
+ tvRefundDetailsStateContent.setText(R.string.txt_refund_fail_tips)
+
+ ilRefundDetailsStateStep1.ivRefundStateStepDot.isSelected = true
+ ilRefundDetailsStateStep1.tvRefundStateStepDesc.text =
+ "2026年9月18日 15:40:07"
+ ilRefundDetailsStateStep2.ivRefundStateStepDot.isSelected = true
+ ilRefundDetailsStateStep2.tvRefundStateStepTitle.setTypeface(typeface)
+ ilRefundDetailsStateStep2.tvRefundStateStepDesc.visibility = View.VISIBLE
+ ilRefundDetailsStateStep2.tvRefundStateStepDesc.setText(R.string.txt_under_review_dec)
+ ilRefundDetailsStateStep3.tvRefundStateStepDesc.visibility = View.VISIBLE
+ ilRefundDetailsStateStep3.tvRefundStateStepDesc.setText(R.string.txt_refund_processing_tips)
+ ilRefundDetailsStateStep3.ivRefundStateStepDot.isSelected = true
+ ilRefundDetailsStateStep3.tvRefundStateStepTitle.setTypeface(typeface)
+ ilRefundDetailsStateStep4.tvRefundStateStepTitle.setText(R.string.txt_refund_failed)
+ ilRefundDetailsStateStep4.tvRefundStateStepTitle.setTypeface(typeface)
+ ilRefundDetailsStateStep4.tvRefundStateStepDesc.visibility = View.VISIBLE
+ ilRefundDetailsStateStep4.tvRefundStateStepDesc.setText(R.string.txt_refund_failed_dec)
+ ilRefundDetailsStateStep4.ivRefundStateStepDot.setImageResource(R.drawable.icon_permission_error_check_svg)
+ }
+
+ 8 -> {
+ tvRefundDetailsStateTitle.setText(R.string.txt_refund_unsuccessful)
+ tvRefundDetailsStateContent.setText(R.string.txt_refund_fail_tips)
+
+ ilRefundDetailsStateStep1.ivRefundStateStepDot.isSelected = true
+ ilRefundDetailsStateStep1.tvRefundStateStepDesc.text =
+ "2026年9月18日 15:40:07"
+ ilRefundDetailsStateStep2.ivRefundStateStepDot.isSelected = true
+ ilRefundDetailsStateStep2.tvRefundStateStepTitle.setTypeface(typeface)
+ ilRefundDetailsStateStep2.tvRefundStateStepDesc.visibility = View.VISIBLE
+ ilRefundDetailsStateStep2.tvRefundStateStepDesc.setText(R.string.txt_under_review_dec)
+ ilRefundDetailsStateStep3.tvRefundStateStepDesc.visibility = View.VISIBLE
+ ilRefundDetailsStateStep3.tvRefundStateStepDesc.setText(R.string.txt_refund_processing_tips)
+ ilRefundDetailsStateStep3.ivRefundStateStepDot.isSelected = true
+ ilRefundDetailsStateStep3.tvRefundStateStepTitle.setTypeface(typeface)
+ ilRefundDetailsStateStep4.tvRefundStateStepTitle.setText(R.string.txt_refund_declined)
+ ilRefundDetailsStateStep4.tvRefundStateStepTitle.setTypeface(typeface)
+ ilRefundDetailsStateStep4.tvRefundStateStepDesc.visibility = View.VISIBLE
+ ilRefundDetailsStateStep4.tvRefundStateStepDesc.setText(R.string.txt_refund_fail_tips)
+ ilRefundDetailsStateStep4.ivRefundStateStepDot.setImageResource(R.drawable.icon_permission_error_check_svg)
+ }
+ }
+ }
+
+ setOnClickListenerViews(tvRefundDetailsRefundPolicy)
+ }
+ }
+
+ override fun onClick(v: View?) {
+ mViewBinding.apply {
+ when (v!!) {
+ tvRefundDetailsRefundPolicy -> RefundPolicyBottomSheetFragment.newInstance()
+ .show(supportFragmentManager, "refund_sheet")
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/abbidot/tracker/ui/activity/subscribe/RequestRefundActivity.kt b/app/src/main/java/com/abbidot/tracker/ui/activity/subscribe/RequestRefundActivity.kt
index 024c721..effc0bb 100644
--- a/app/src/main/java/com/abbidot/tracker/ui/activity/subscribe/RequestRefundActivity.kt
+++ b/app/src/main/java/com/abbidot/tracker/ui/activity/subscribe/RequestRefundActivity.kt
@@ -2,6 +2,7 @@ package com.abbidot.tracker.ui.activity.subscribe
import android.text.TextUtils
import android.view.View
+import android.widget.TextView
import androidx.activity.viewModels
import com.abbidot.baselibrary.constant.EventName
import com.abbidot.baselibrary.eventbus.XEventBus
@@ -12,8 +13,12 @@ import com.abbidot.tracker.constant.ConstantInt
import com.abbidot.tracker.constant.ConstantString
import com.abbidot.tracker.constant.GetResultCallback
import com.abbidot.tracker.databinding.ActivityRequestRefundBinding
+import com.abbidot.tracker.ui.fragment.subscribe.RefundPolicyBottomSheetFragment
import com.abbidot.tracker.util.Util
import com.abbidot.tracker.vm.SubscriptionManageViewModel
+import com.easysocket.utils.LogUtil
+import com.google.android.material.bottomsheet.BottomSheetBehavior
+import com.google.android.material.bottomsheet.BottomSheetDialog
class RequestRefundActivity :
BaseActivity(ActivityRequestRefundBinding::inflate) {
@@ -46,7 +51,7 @@ class RequestRefundActivity :
tvRequestRefundRefund.text = refundRefund
}
- setOnClickListenerViews(btnRequestRefundRecharge)
+ setOnClickListenerViews(btnRequestRefundRecharge, tvRequestRefundPolicy)
}
}
@@ -106,11 +111,17 @@ class RequestRefundActivity :
}
}
+
override fun onClick(v: View?) {
- setButtonEnabled(v!!)
mViewBinding.apply {
when (v) {
- btnRequestRefundRecharge -> commitRefund()
+ btnRequestRefundRecharge -> {
+ setButtonEnabled(v)
+ commitRefund()
+ }
+
+ tvRequestRefundPolicy -> RefundPolicyBottomSheetFragment.newInstance()
+ .show(supportFragmentManager, "refund_sheet")
}
}
}
diff --git a/app/src/main/java/com/abbidot/tracker/ui/activity/subscribe/SubscriptionHistoryActivity.kt b/app/src/main/java/com/abbidot/tracker/ui/activity/subscribe/SubscriptionHistoryActivity.kt
index 5ebac75..b7bd1f0 100644
--- a/app/src/main/java/com/abbidot/tracker/ui/activity/subscribe/SubscriptionHistoryActivity.kt
+++ b/app/src/main/java/com/abbidot/tracker/ui/activity/subscribe/SubscriptionHistoryActivity.kt
@@ -10,6 +10,7 @@ import com.abbidot.tracker.R
import com.abbidot.tracker.adapter.HelpTextImageTypeAdapter
import com.abbidot.tracker.adapter.SubscriptionHistoryAdapter
import com.abbidot.tracker.base.BaseActivity
+import com.abbidot.tracker.base.BaseDialog
import com.abbidot.tracker.bean.MenuTxtBean
import com.abbidot.tracker.bean.SubscriptionsOrderBean
import com.abbidot.tracker.constant.ConstantInt
@@ -17,6 +18,7 @@ import com.abbidot.tracker.constant.ConstantString
import com.abbidot.tracker.constant.GetResultCallback
import com.abbidot.tracker.constant.MultipleEntity
import com.abbidot.tracker.databinding.ActivitySubscriptionHistoryBinding
+import com.abbidot.tracker.ui.fragment.subscribe.RefundPolicyBottomSheetFragment
import com.abbidot.tracker.util.ViewUtil
import com.abbidot.tracker.vm.SubscriptionManageViewModel
import com.daimajia.androidanimations.library.Techniques
@@ -32,6 +34,8 @@ class SubscriptionHistoryActivity :
private var subscriptionId = ""
private var mRefreshPackage = true
+ private var mPosition = 0
+
override fun getTopBar() = mViewBinding.ilSubscriptionHistoryTopBar.titleTopBar
override fun initData() {
@@ -47,72 +51,10 @@ class SubscriptionHistoryActivity :
ViewUtil.instance.setRecyclerViewVerticalLinearLayout(
mContext, rvSubscriptionHistoryList, mHistoryAdapter, bottom = AppUtils.dpToPx(12)
)
- setOnClickListenerViews(btnSubscriptionRefundIssue, tvCloseRefundIssueBtn)
+ setOnClickListenerViews(btnSubscriptionRefundIssue)
}
-
- initIssue()
}
- private fun initIssue() {
- val menuList = mutableListOf()
- ViewUtil.instance.addMenuBean(
- menuList,
- getString(R.string.txt_refund_policy),
- menuType = MultipleEntity.TEXT_TEXT_IMG,
- colorRedId = R.color.data_black_color,
- isSwitch = true,
- state = 16
- )
- ViewUtil.instance.addMenuBean(
- menuList,
- getString(R.string.txt_automatic_refund),
- menuType = MultipleEntity.TEXT_TEXT_IMG,
- colorRedId = R.color.data_black_color,
- isSwitch = true,
- state = 12
- )
- ViewUtil.instance.addMenuBean(
- menuList,
- getString(R.string.txt_automatic_refund_dec),
- menuType = MultipleEntity.TEXT_TEXT_IMG,
- colorRedId = R.color.data_black_color,
- state = 12
- )
- ViewUtil.instance.addMenuBean(
- menuList,
- getString(R.string.txt_standard_refund),
- menuType = MultipleEntity.TEXT_TEXT_IMG,
- colorRedId = R.color.data_black_color,
- isSwitch = true,
- state = 12
- )
- ViewUtil.instance.addMenuBean(
- menuList,
- getString(R.string.txt_standard_refund_dec),
- menuType = MultipleEntity.TEXT_TEXT_IMG,
- colorRedId = R.color.data_black_color,
- state = 12
- )
- ViewUtil.instance.addMenuBean(
- menuList,
- getString(R.string.txt_no_refund),
- menuType = MultipleEntity.TEXT_TEXT_IMG,
- colorRedId = R.color.data_black_color,
- isSwitch = true,
- state = 12
- )
- ViewUtil.instance.addMenuBean(
- menuList,
- getString(R.string.txt_no_refund_dec),
- menuType = MultipleEntity.TEXT_TEXT_IMG,
- colorRedId = R.color.data_black_color,
- state = 12
- )
- val helpBatteryAdapter = HelpTextImageTypeAdapter(menuList)
- ViewUtil.instance.setRecyclerViewVerticalLinearLayout(
- mContext, mViewBinding.rvSubscriptionRefundIssueList, helpBatteryAdapter
- )
- }
override fun onResume() {
super.onResume()
@@ -126,51 +68,74 @@ class SubscriptionHistoryActivity :
XEventBus.observe(this, EventName.RefreshPackage) {
mRefreshPackage = true
}
- mSubscriptionViewModel.mSubscriptionsHistoryLiveData.observe(this) {
- dealRequestResult(it, object : GetResultCallback {
- override fun onResult(any: Any) {
- it.getOrNull()?.let { list ->
- if (mSubscriptionsOrderList.size > 0) {
- mHistoryAdapter.notifyItemRangeRemoved(0, mSubscriptionsOrderList.size)
- mSubscriptionsOrderList.clear()
- }
- for (l in list) {
- mSubscriptionsOrderList.add(l)
- if (l.annualCareType == ConstantInt.Type1) {
- val subscriptionsOrder = l.copy(menuType = MultipleEntity.IMG)
- mSubscriptionsOrderList.add(subscriptionsOrder)
+ mSubscriptionViewModel.apply {
+ mSubscriptionsHistoryLiveData.observe(this@SubscriptionHistoryActivity) {
+ dealRequestResult(it, object : GetResultCallback {
+ override fun onResult(any: Any) {
+ it.getOrNull()?.let { list ->
+ if (mSubscriptionsOrderList.isNotEmpty()) {
+ mHistoryAdapter.notifyItemRangeRemoved(
+ 0,
+ mSubscriptionsOrderList.size
+ )
+ mSubscriptionsOrderList.clear()
}
+ for (l in list) {
+ mSubscriptionsOrderList.add(l)
+ if (l.annualCareType == ConstantInt.Type1) {
+ val subscriptionsOrder = l.copy(menuType = MultipleEntity.IMG)
+ mSubscriptionsOrderList.add(subscriptionsOrder)
+ }
+ }
+ mHistoryAdapter.notifyItemRangeChanged(0, mSubscriptionsOrderList.size)
}
- mHistoryAdapter.notifyItemRangeChanged(0, mSubscriptionsOrderList.size)
}
- }
- })
+ })
+ }
+
+ mUpdateStatusListLiveData.observe(this@SubscriptionHistoryActivity) {
+ dealRequestResult(it, object : GetResultCallback {
+ override fun onResult(any: Any) {
+ showToast(R.string.txt_successful)
+ XEventBus.post(EventName.RefreshPackage)
+ mHistoryAdapter.data[mPosition].let { bean ->
+ bean.subscriptionStatus =
+ if (bean.subscriptionStatus == ConstantInt.Close) ConstantInt.Open
+ else ConstantInt.Close
+ mHistoryAdapter.notifyItemChanged(mPosition)
+ }
+ }
+ })
+ }
}
}
- /**
- * 显示问题
- */
- private fun showLedIssue() {
- mViewBinding.apply {
- if (llSubscriptionRefundIssueLayout.isGone) {
- YoYo.with(Techniques.BounceInUp).duration(700).onStart {
- llSubscriptionRefundIssueLayout.visibility = View.VISIBLE
- vRefundIssueShadeView.visibility = View.VISIBLE
- }.playOn(llSubscriptionRefundIssueLayout)
- } else {
- vRefundIssueShadeView.visibility = View.GONE
- YoYo.with(Techniques.SlideOutDown).duration(600).onEnd {
- llSubscriptionRefundIssueLayout.visibility = View.GONE
- }.playOn(llSubscriptionRefundIssueLayout)
- }
+ fun updateSubscriptionStatus(subscriptionId: String, status: Int, position: Int) {
+ mPosition = position
+ var messageId = 0
+ var renewStatus: Int
+ val title = if (0 == status) {
+ renewStatus = ConstantInt.Open
+ R.string.txt_turn_on_auto_renew
+ } else {
+ renewStatus = ConstantInt.Close
+ messageId = R.string.txt_plan_active_until_expires
+ R.string.txt_turn_off_auto_renew
}
+
+ ViewUtil.instance.showDialog(mContext, messageId, object : BaseDialog.OnDialogOkListener {
+ override fun onOkClick(dialog: BaseDialog<*>) {
+ dialog.dismiss()
+ mSubscriptionViewModel.updateSubscriptionStatus(subscriptionId, renewStatus)
+ }
+ }, okTextResId = R.string.start_txt_yes, title = getString(title))
}
override fun onClick(v: View?) {
mViewBinding.apply {
when (v!!) {
- btnSubscriptionRefundIssue, tvCloseRefundIssueBtn -> showLedIssue()
+ btnSubscriptionRefundIssue -> RefundPolicyBottomSheetFragment.newInstance()
+ .show(supportFragmentManager, "refund_sheet")
}
}
}
diff --git a/app/src/main/java/com/abbidot/tracker/ui/fragment/subscribe/RefundPolicyBottomSheetFragment.kt b/app/src/main/java/com/abbidot/tracker/ui/fragment/subscribe/RefundPolicyBottomSheetFragment.kt
new file mode 100644
index 0000000..6d25192
--- /dev/null
+++ b/app/src/main/java/com/abbidot/tracker/ui/fragment/subscribe/RefundPolicyBottomSheetFragment.kt
@@ -0,0 +1,112 @@
+package com.abbidot.tracker.ui.fragment.subscribe
+
+import android.os.Bundle
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import com.abbidot.tracker.R
+import com.abbidot.tracker.adapter.HelpTextImageTypeAdapter
+import com.abbidot.tracker.bean.MenuTxtBean
+import com.abbidot.tracker.constant.MultipleEntity
+import com.abbidot.tracker.databinding.FragmentRefundPolicyBottomSheetBinding
+import com.abbidot.tracker.util.ViewUtil
+import com.baidu.mshield.x0.EngineImpl.mContext
+import com.google.android.material.bottomsheet.BottomSheetDialogFragment
+
+/**
+ * 退款政策弹窗
+ */
+class RefundPolicyBottomSheetFragment : BottomSheetDialogFragment() {
+
+ private lateinit var mViewBinding: FragmentRefundPolicyBottomSheetBinding
+
+ companion object {
+ fun newInstance(): RefundPolicyBottomSheetFragment {
+ return RefundPolicyBottomSheetFragment()
+ }
+ }
+
+ override fun onCreateView(
+ inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?
+ ): View? {
+ mViewBinding = FragmentRefundPolicyBottomSheetBinding.inflate(inflater, container, false)
+ return mViewBinding.root
+ }
+
+ override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
+ super.onViewCreated(view, savedInstanceState)
+ // Close按钮关闭弹窗
+ mViewBinding.tvCloseRefundIssueBtn.setOnClickListener {
+ dismiss()
+ }
+ initIssue()
+ }
+
+
+ // 给Fragment设置圆角样式
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ setStyle(STYLE_NORMAL, R.style.MyBottomSheetStyle)
+ }
+
+ private fun initIssue() {
+ val menuList = mutableListOf()
+ ViewUtil.instance.addMenuBean(
+ menuList,
+ getString(R.string.txt_refund_policy),
+ menuType = MultipleEntity.TEXT_TEXT_IMG,
+ colorRedId = R.color.data_black_color,
+ isSwitch = true,
+ state = 16
+ )
+ ViewUtil.instance.addMenuBean(
+ menuList,
+ getString(R.string.txt_automatic_refund),
+ menuType = MultipleEntity.TEXT_TEXT_IMG,
+ colorRedId = R.color.data_black_color,
+ isSwitch = true,
+ state = 12
+ )
+ ViewUtil.instance.addMenuBean(
+ menuList,
+ getString(R.string.txt_automatic_refund_dec),
+ menuType = MultipleEntity.TEXT_TEXT_IMG,
+ colorRedId = R.color.data_black_color,
+ state = 12
+ )
+ ViewUtil.instance.addMenuBean(
+ menuList,
+ getString(R.string.txt_standard_refund),
+ menuType = MultipleEntity.TEXT_TEXT_IMG,
+ colorRedId = R.color.data_black_color,
+ isSwitch = true,
+ state = 12
+ )
+ ViewUtil.instance.addMenuBean(
+ menuList,
+ getString(R.string.txt_standard_refund_dec),
+ menuType = MultipleEntity.TEXT_TEXT_IMG,
+ colorRedId = R.color.data_black_color,
+ state = 12
+ )
+ ViewUtil.instance.addMenuBean(
+ menuList,
+ getString(R.string.txt_no_refund),
+ menuType = MultipleEntity.TEXT_TEXT_IMG,
+ colorRedId = R.color.data_black_color,
+ isSwitch = true,
+ state = 12
+ )
+ ViewUtil.instance.addMenuBean(
+ menuList,
+ getString(R.string.txt_no_refund_dec),
+ menuType = MultipleEntity.TEXT_TEXT_IMG,
+ colorRedId = R.color.data_black_color,
+ state = 12
+ )
+ val helpBatteryAdapter = HelpTextImageTypeAdapter(menuList)
+ ViewUtil.instance.setRecyclerViewVerticalLinearLayout(
+ mContext, mViewBinding.rvSubscriptionRefundIssueList, helpBatteryAdapter
+ )
+ }
+}
diff --git a/app/src/main/java/com/abbidot/tracker/util/ViewUtil.kt b/app/src/main/java/com/abbidot/tracker/util/ViewUtil.kt
index 6907d9f..798a730 100644
--- a/app/src/main/java/com/abbidot/tracker/util/ViewUtil.kt
+++ b/app/src/main/java/com/abbidot/tracker/util/ViewUtil.kt
@@ -462,9 +462,10 @@ class ViewUtil private constructor() {
cancelListener: BaseDialog.OnDialogCancelListener? = null
) {
try {
+ val content = if (contentResId == 0) "" else context.getString(contentResId)
showDialog(
context,
- context.getString(contentResId),
+ content,
okListener,
title,
okTextResId,
@@ -1135,18 +1136,6 @@ class ViewUtil private constructor() {
}
}
- /**
- * 操作提示框
- */
- fun operateDialogTips(context: Context, messageID: Int, okCallback: () -> Unit) {
- showDialog(context, messageID, object : BaseDialog.OnDialogOkListener {
- override fun onOkClick(dialog: BaseDialog<*>) {
- dialog.dismiss()
- okCallback()
- }
- }, okTextResId = R.string.start_txt_yes)
- }
-
/**
* 手动连接蓝牙提示
*/
diff --git a/app/src/main/res/drawable-xhdpi/icon_state_time.png b/app/src/main/res/drawable-xhdpi/icon_state_time.png
new file mode 100644
index 0000000..1ca5815
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/icon_state_time.png differ
diff --git a/app/src/main/res/drawable-xxhdpi/icon_state_time.png b/app/src/main/res/drawable-xxhdpi/icon_state_time.png
new file mode 100644
index 0000000..3cc97ed
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/icon_state_time.png differ
diff --git a/app/src/main/res/drawable-xxxhdpi/icon_state_time.png b/app/src/main/res/drawable-xxxhdpi/icon_state_time.png
new file mode 100644
index 0000000..d4cfd4a
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/icon_state_time.png differ
diff --git a/app/src/main/res/drawable/selector_refund_state_step_dot.xml b/app/src/main/res/drawable/selector_refund_state_step_dot.xml
new file mode 100644
index 0000000..7c763e7
--- /dev/null
+++ b/app/src/main/res/drawable/selector_refund_state_step_dot.xml
@@ -0,0 +1,39 @@
+
+
+
+ -
+
+
-
+
+
+
+
+
+
+
+
+
+ -
+
+
-
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_help_tracker_status.xml b/app/src/main/res/layout/activity_help_tracker_status.xml
index 581cd0a..3e883e7 100644
--- a/app/src/main/res/layout/activity_help_tracker_status.xml
+++ b/app/src/main/res/layout/activity_help_tracker_status.xml
@@ -2,7 +2,6 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_request_refund.xml b/app/src/main/res/layout/activity_request_refund.xml
index 013a2e9..51edfc8 100644
--- a/app/src/main/res/layout/activity_request_refund.xml
+++ b/app/src/main/res/layout/activity_request_refund.xml
@@ -77,9 +77,21 @@
android:id="@+id/btn_request_refund_recharge"
style="@style/my_RoundRect_Button_style"
android:layout_gravity="center"
- android:layout_marginBottom="@dimen/dp_80"
+ android:layout_marginBottom="@dimen/dp_40"
android:background="@drawable/shape8_gray_yellow_bg"
android:text="@string/register_txt_submit"
app:qmui_radius="@dimen/dp_50"
app:typeface="@string/roboto_bold_font" />
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_splash.xml b/app/src/main/res/layout/activity_splash.xml
index cebb404..f858037 100644
--- a/app/src/main/res/layout/activity_splash.xml
+++ b/app/src/main/res/layout/activity_splash.xml
@@ -12,7 +12,6 @@
android:layout_width="290dp"
android:layout_height="290dp"
android:src="@drawable/abbidot_logo_loading"
- android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
diff --git a/app/src/main/res/layout/activity_subscription_history.xml b/app/src/main/res/layout/activity_subscription_history.xml
index 1b45671..936928b 100644
--- a/app/src/main/res/layout/activity_subscription_history.xml
+++ b/app/src/main/res/layout/activity_subscription_history.xml
@@ -35,40 +35,4 @@
android:paddingHorizontal="@dimen/dp_20"
android:paddingVertical="@dimen/dp_12" />
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_refund_policy_bottom_sheet.xml b/app/src/main/res/layout/fragment_refund_policy_bottom_sheet.xml
new file mode 100644
index 0000000..7d22c48
--- /dev/null
+++ b/app/src/main/res/layout/fragment_refund_policy_bottom_sheet.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/item_my_subscription_layout.xml b/app/src/main/res/layout/item_my_subscription_layout.xml
index e79c252..bd88f7c 100644
--- a/app/src/main/res/layout/item_my_subscription_layout.xml
+++ b/app/src/main/res/layout/item_my_subscription_layout.xml
@@ -10,10 +10,9 @@
+ android:layout_gravity="end">
+ android:src="@drawable/icon_point_bg_svg"
+ android:visibility="gone" />
+
+
@@ -34,12 +43,14 @@
android:textSize="@dimen/textSize36"
android:textStyle="bold" />
-
+
+ android:orientation="horizontal"
+ android:visibility="gone">
@@ -37,11 +36,11 @@
android:id="@+id/tv_subscription_history_annual_care_title"
style="@style/my_TextView_style_v2"
android:layout_below="@id/tv_subscription_history_order_time"
- android:text="@string/txt_annual_care_text1"
- android:visibility="gone"
android:layout_marginTop="@dimen/dp_4"
+ android:text="@string/txt_annual_care_text1"
android:textSize="@dimen/textSize14"
- android:textStyle="bold" />
+ android:textStyle="bold"
+ android:visibility="gone" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/layout_dfu_custom_qmui_group_right.xml b/app/src/main/res/layout/layout_dfu_custom_qmui_group_right.xml
index 1ab0ae2..e865057 100644
--- a/app/src/main/res/layout/layout_dfu_custom_qmui_group_right.xml
+++ b/app/src/main/res/layout/layout_dfu_custom_qmui_group_right.xml
@@ -1,6 +1,5 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/sheet_dialog_auto_recharge.xml b/app/src/main/res/layout/sheet_dialog_auto_recharge.xml
deleted file mode 100644
index d2320ff..0000000
--- a/app/src/main/res/layout/sheet_dialog_auto_recharge.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index ee28900..6a4ec5f 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -382,4 +382,5 @@
#758E94
#FF996E
#FEF6E4
+ #0099CC
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 98ce66f..575b148 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -164,7 +164,7 @@
Bluetooth Radar
Saved. Active when online.
Refund period has expired
- Refund Policy\n
+ Refund Policy
Automatic Refund (Within 48 Hours)
All subscription purchases are eligible for a full automatic refund within 48 hours of payment. Refunds will be processed automatically without manual review.\n
Standard Refund Window (30 Days)
@@ -1000,4 +1000,36 @@
Remove
Turn Off & Remove
Unauthorized app. Download from official sources
+
+ Auto-Renewal
+ Unavailable
+ Available
+ Under Review
+ Processing
+ Failed
+ Declined
+ Turn off auto-renew?
+ Turn on auto-renew?
+ Your refund request has been submitted and is being reviewed.
+ Your plan stays active until it expires.
+ Refund details
+ Plan
+ Order ID
+ Order Time
+ Paid Method
+ Refund Amount
+ Refund Status
+ Refund Processing
+ Your refund has been approved and is being processed.
+ Refund Completed
+ Refund Unsuccessful
+ Your refund has been sent to your original payment method.
+ Your refund request was not approved.
+ Your refund request has been submitted.
+ Request Submitted
+ Your refund request is being reviewed.
+ We couldn\'t complete your refund. Please try again or contact support.
+ Refund Failed
+ Refund Declined
+ Refund Pending
\ No newline at end of file
diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml
index d0c5efc..8e4f144 100644
--- a/app/src/main/res/values/themes.xml
+++ b/app/src/main/res/values/themes.xml
@@ -256,4 +256,13 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
index f048349..44ded6e 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -11,7 +11,7 @@
# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
# org.gradle.parallel=true
#Wed Jul 08 17:07:15 CST 2026
-BAIDU_MAP_KEY=YT2CmlqAkpMyzmw1AKNIBlYlBtHESEaW
+BAIDU_MAP_KEY=Y3ANA8hXCrz0rj2HTXVdq9fWvBMx2B4b
BUGLY_KEY=06fc0a9cd1
GOOGLE_MAP_KEY=AIzaSyCFEqlOoo2274NsX7tzoQjs_DA7B9N7-gY
HTTP_REQUEST_KEY=ODk4OPUpVSSU1TS0hLZWhtYXNkZldFa2poZiEqamZzYWRmODQ1Mw==