1.用户已购套餐页面优化,新增退款详情页面
2.优化退款协议弹窗,写成通用弹窗,可复用显示
This commit is contained in:
@@ -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"
|
||||
|
||||
|
||||
@@ -88,8 +88,7 @@
|
||||
tools:targetApi="s" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_CONNECTED_DEVICE" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION" />
|
||||
<!-- 指定微信包名 -->
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION" /> <!-- 指定微信包名 -->
|
||||
<queries>
|
||||
<package android:name="com.tencent.mm" />
|
||||
</queries>
|
||||
@@ -109,6 +108,9 @@
|
||||
android:usesCleartextTraffic="true"
|
||||
tools:replace="android:supportsRtl"
|
||||
tools:targetApi="33">
|
||||
<activity
|
||||
android:name=".ui.activity.subscribe.RefundDetailsActivity"
|
||||
android:exported="false" />
|
||||
<activity
|
||||
android:name=".ui.activity.help.HelpTrackerStatusActivity"
|
||||
android:exported="false" />
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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<TextView>(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<LinearLayoutCompat>(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<AppCompatImageView>(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<TypefaceTextView>(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<LinearLayoutCompat>(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(
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
@@ -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,9 +364,20 @@ 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?) {
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
@@ -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>(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")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>(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")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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<MenuTxtBean>()
|
||||
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,12 +68,16 @@ class SubscriptionHistoryActivity :
|
||||
XEventBus.observe(this, EventName.RefreshPackage) {
|
||||
mRefreshPackage = true
|
||||
}
|
||||
mSubscriptionViewModel.mSubscriptionsHistoryLiveData.observe(this) {
|
||||
mSubscriptionViewModel.apply {
|
||||
mSubscriptionsHistoryLiveData.observe(this@SubscriptionHistoryActivity) {
|
||||
dealRequestResult(it, object : GetResultCallback {
|
||||
override fun onResult(any: Any) {
|
||||
it.getOrNull()?.let { list ->
|
||||
if (mSubscriptionsOrderList.size > 0) {
|
||||
mHistoryAdapter.notifyItemRangeRemoved(0, mSubscriptionsOrderList.size)
|
||||
if (mSubscriptionsOrderList.isNotEmpty()) {
|
||||
mHistoryAdapter.notifyItemRangeRemoved(
|
||||
0,
|
||||
mSubscriptionsOrderList.size
|
||||
)
|
||||
mSubscriptionsOrderList.clear()
|
||||
}
|
||||
for (l in list) {
|
||||
@@ -146,31 +92,50 @@ class SubscriptionHistoryActivity :
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
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)
|
||||
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 {
|
||||
vRefundIssueShadeView.visibility = View.GONE
|
||||
YoYo.with(Techniques.SlideOutDown).duration(600).onEnd {
|
||||
llSubscriptionRefundIssueLayout.visibility = View.GONE
|
||||
}.playOn(llSubscriptionRefundIssueLayout)
|
||||
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")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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<MenuTxtBean>()
|
||||
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
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
/**
|
||||
* 手动连接蓝牙提示
|
||||
*/
|
||||
|
||||
BIN
app/src/main/res/drawable-xhdpi/icon_state_time.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/icon_state_time.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 529 B |
BIN
app/src/main/res/drawable-xxhdpi/icon_state_time.png
Normal file
BIN
app/src/main/res/drawable-xxhdpi/icon_state_time.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 778 B |
BIN
app/src/main/res/drawable-xxxhdpi/icon_state_time.png
Normal file
BIN
app/src/main/res/drawable-xxxhdpi/icon_state_time.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
39
app/src/main/res/drawable/selector_refund_state_step_dot.xml
Normal file
39
app/src/main/res/drawable/selector_refund_state_step_dot.xml
Normal file
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 已完成:绿色圆圈+对勾 -->
|
||||
<item android:state_selected="true">
|
||||
<layer-list>
|
||||
<item>
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="#34C759"/>
|
||||
<size android:width="32dp" android:height="32dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
<item android:drawable="@drawable/icon_permission_check_svg" android:gravity="center"/>
|
||||
</layer-list>
|
||||
</item>
|
||||
<!-- 进行中:空心绿圈,内部填充绿圆 -->
|
||||
<item android:state_activated="true">
|
||||
<layer-list>
|
||||
<item>
|
||||
<shape android:shape="oval">
|
||||
<stroke android:width="3dp" android:color="#34C759"/>
|
||||
<size android:width="32dp" android:height="32dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
<item android:gravity="center">
|
||||
<shape android:shape="oval">
|
||||
<solid android:color="#34C759"/>
|
||||
<size android:width="@dimen/dp_16" android:height="@dimen/dp_16"/>
|
||||
</shape>
|
||||
</item>
|
||||
</layer-list>
|
||||
</item>
|
||||
<!-- 未完成:灰色空心圆 -->
|
||||
<item>
|
||||
<shape android:shape="oval">
|
||||
<stroke android:width="2dp" android:color="#AAAAAA"/>
|
||||
<size android:width="32dp" android:height="32dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
@@ -2,7 +2,6 @@
|
||||
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
|
||||
246
app/src/main/res/layout/activity_refund_details.xml
Normal file
246
app/src/main/res/layout/activity_refund_details.xml
Normal file
@@ -0,0 +1,246 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
tools:context=".ui.activity.subscribe.RefundDetailsActivity">
|
||||
|
||||
<include
|
||||
android:id="@+id/il_refund_details_top_bar"
|
||||
layout="@layout/layout_top_bar" />
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1">
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginHorizontal="@dimen/dp_18"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/shape20_yellow_border_cyan_bg"
|
||||
android:paddingHorizontal="@dimen/dp_16"
|
||||
android:paddingVertical="@dimen/dp_18">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_refund_details_state_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@drawable/icon_state_time" />
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
android:id="@+id/tv_refund_details_state_title"
|
||||
style="@style/my_TextView_style_v2"
|
||||
android:layout_marginStart="@dimen/dp_16"
|
||||
android:layout_toEndOf="@id/iv_refund_details_state_image"
|
||||
android:text="@string/txt_refund_pending"
|
||||
android:textSize="@dimen/textSize14"
|
||||
app:typeface="@string/roboto_bold_font" />
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
android:id="@+id/tv_refund_details_state_content"
|
||||
style="@style/my_TextView_style_v2"
|
||||
android:layout_below="@id/tv_refund_details_state_title"
|
||||
android:layout_alignStart="@id/tv_refund_details_state_title"
|
||||
android:layout_marginTop="@dimen/dp_4"
|
||||
android:gravity="start"
|
||||
android:text="@string/txt_refund_pending_tips"
|
||||
android:textSize="@dimen/textSize14"
|
||||
app:lineHeight="@dimen/dp_16"
|
||||
app:typeface="@string/roboto_regular_font" />
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:background="@drawable/shape16_white_color_bg"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/dp_18">
|
||||
<!-- 行1 Plan -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingVertical="@dimen/dp_8">
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
style="@style/my_TextView_style_v2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="start"
|
||||
android:text="@string/txt_plan1"
|
||||
android:textSize="@dimen/textSize14"
|
||||
app:typeface="@string/roboto_regular_font" />
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
android:id="@+id/tv_refund_details_plan_name"
|
||||
style="@style/my_TextView_style_v2"
|
||||
android:text="@string/app_name"
|
||||
android:textSize="@dimen/textSize14"
|
||||
app:typeface="@string/roboto_regular_font" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 行2 Order ID -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingVertical="@dimen/dp_8">
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
style="@style/my_TextView_style_v2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="start"
|
||||
android:text="@string/txt_order_id1"
|
||||
android:textSize="@dimen/textSize14"
|
||||
app:typeface="@string/roboto_regular_font" />
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
android:id="@+id/tv_refund_details_order_id"
|
||||
style="@style/my_TextView_style_v2"
|
||||
android:text="@string/app_name"
|
||||
android:textSize="@dimen/textSize14"
|
||||
app:typeface="@string/roboto_regular_font" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 行3 Order Time -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingVertical="@dimen/dp_8">
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
style="@style/my_TextView_style_v2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="start"
|
||||
android:text="@string/txt_order_time"
|
||||
android:textSize="@dimen/textSize14"
|
||||
app:typeface="@string/roboto_regular_font" />
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
android:id="@+id/tv_refund_details_order_time"
|
||||
style="@style/my_TextView_style_v2"
|
||||
android:text="@string/app_name"
|
||||
android:textSize="@dimen/textSize14"
|
||||
app:typeface="@string/roboto_regular_font" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 行4 Paid Method -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingVertical="@dimen/dp_8">
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
style="@style/my_TextView_style_v2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="start"
|
||||
android:text="@string/txt_paid_method"
|
||||
android:textSize="@dimen/textSize14"
|
||||
app:typeface="@string/roboto_regular_font" />
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
android:id="@+id/tv_refund_details_paid_method"
|
||||
style="@style/my_TextView_style_v2"
|
||||
android:text="@string/app_name"
|
||||
android:textSize="@dimen/textSize14"
|
||||
app:typeface="@string/roboto_regular_font" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<!-- 分割线 -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginVertical="@dimen/dp_2"
|
||||
android:layout_height="@dimen/dp_1"
|
||||
android:background="@color/permission_no_check_color" />
|
||||
|
||||
<!-- 行5 Refund Amount -->
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingVertical="@dimen/dp_8">
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
style="@style/my_TextView_style_v2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="start"
|
||||
android:text="@string/txt_refund_amount"
|
||||
android:textSize="@dimen/textSize14"
|
||||
app:typeface="@string/roboto_regular_font" />
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
android:id="@+id/tv_refund_details_refund_amount"
|
||||
style="@style/my_TextView_style_v2"
|
||||
android:text="@string/app_name"
|
||||
android:textSize="@dimen/textSize14"
|
||||
app:typeface="@string/roboto_bold_font" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:background="@drawable/shape16_white_color_bg"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/dp_18">
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
style="@style/my_TextView_style_v2"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:text="@string/txt_refund_status"
|
||||
android:textSize="@dimen/textSize14"
|
||||
app:typeface="@string/roboto_bold_font" />
|
||||
|
||||
<!-- 步骤1 Request Submitted -->
|
||||
<include
|
||||
android:id="@+id/il_refund_details_state_step1"
|
||||
layout="@layout/layout_refund_state_item" />
|
||||
<!-- 步骤2 Under Review -->
|
||||
<include
|
||||
android:id="@+id/il_refund_details_state_step2"
|
||||
layout="@layout/layout_refund_state_item" />
|
||||
<!-- 步骤3 Refund Processing -->
|
||||
<include
|
||||
android:id="@+id/il_refund_details_state_step3"
|
||||
layout="@layout/layout_refund_state_item" />
|
||||
<!-- 步骤4 Refund Completed -->
|
||||
<include
|
||||
android:id="@+id/il_refund_details_state_step4"
|
||||
layout="@layout/layout_refund_state_item" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
android:id="@+id/tv_refund_details_refund_policy"
|
||||
style="@style/my_TextView_style_v2"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginVertical="@dimen/dp_18"
|
||||
android:background="@drawable/selector_transparent_pressed"
|
||||
android:paddingVertical="@dimen/dp_8"
|
||||
android:text="@string/txt_refund_policy"
|
||||
android:textColor="@color/blue_color11"
|
||||
android:textSize="@dimen/textSize14"
|
||||
app:typeface="@string/roboto_regular_font" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
@@ -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" />
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
android:id="@+id/tv_request_refund_policy"
|
||||
style="@style/my_TextView_style_v2"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginBottom="@dimen/dp_26"
|
||||
android:background="@drawable/selector_transparent_pressed"
|
||||
android:paddingVertical="@dimen/dp_8"
|
||||
android:text="@string/txt_refund_policy"
|
||||
android:textColor="@color/blue_color11"
|
||||
android:textSize="@dimen/textSize14"
|
||||
app:typeface="@string/roboto_regular_font" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
@@ -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"
|
||||
|
||||
@@ -35,40 +35,4 @@
|
||||
android:paddingHorizontal="@dimen/dp_20"
|
||||
android:paddingVertical="@dimen/dp_12" />
|
||||
|
||||
<View
|
||||
android:id="@+id/v_refund_issue_shade_view"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/transparent_half"
|
||||
android:visibility="gone" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/ll_subscription_refund_issue_layout"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@drawable/shape30_white_half_bottom_shadow_bg"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_subscription_refund_issue_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="@dimen/dp_20"
|
||||
android:paddingVertical="@dimen/dp_16" />
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
android:id="@+id/tv_close_refund_issue_btn"
|
||||
style="@style/my_TextView_style_v2"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="@dimen/dp_12"
|
||||
android:background="@drawable/selector_transparent_pressed"
|
||||
android:padding="@dimen/dp_16"
|
||||
android:text="@string/txt_close"
|
||||
android:textColor="@color/select_color3"
|
||||
android:textSize="@dimen/textSize12"
|
||||
app:typeface="@string/roboto_regular_font" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/ll_subscription_refund_issue_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@drawable/shape30_white_half_bottom_shadow_bg"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rv_subscription_refund_issue_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="@dimen/dp_20"
|
||||
android:paddingVertical="@dimen/dp_16" />
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
android:id="@+id/tv_close_refund_issue_btn"
|
||||
style="@style/my_TextView_style_v2"
|
||||
android:layout_gravity="center"
|
||||
android:layout_margin="@dimen/dp_12"
|
||||
android:background="@drawable/selector_transparent_pressed"
|
||||
android:padding="@dimen/dp_16"
|
||||
android:text="@string/txt_close"
|
||||
android:textColor="@color/select_color3"
|
||||
android:textSize="@dimen/textSize12"
|
||||
app:typeface="@string/roboto_regular_font" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
@@ -10,10 +10,9 @@
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/fl_my_subscription_btn_layout"
|
||||
android:layout_width="@dimen/dp_50"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:paddingBottom="@dimen/dp_18">
|
||||
android:layout_gravity="end">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_my_subscription_btn"
|
||||
@@ -21,7 +20,17 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:layout_marginEnd="@dimen/dp_8"
|
||||
android:src="@drawable/icon_point_bg_svg" />
|
||||
android:src="@drawable/icon_point_bg_svg"
|
||||
android:visibility="gone" />
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceRoundButton
|
||||
android:id="@+id/btn_more_activity_edit_goal"
|
||||
style="@style/my_QMUIRoundButton_very_small_style"
|
||||
android:text="@string/txt_more"
|
||||
android:textColor="@color/btn_color"
|
||||
app:qmui_borderColor="@color/btn_color"
|
||||
app:qmui_borderWidth="0.55dp"
|
||||
app:typeface="@string/roboto_bold_font" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
@@ -34,12 +43,14 @@
|
||||
android:textSize="@dimen/textSize36"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
style="@style/my_TextView_style_v2"
|
||||
android:layout_width="match_parent"
|
||||
android:text="@string/txt_tracker_id"
|
||||
android:textSize="@dimen/textSize16"
|
||||
app:typeface="@string/roboto_regular_font" />
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_my_subscription_device_image"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:maxWidth="@dimen/dp_53"
|
||||
android:src="@drawable/icon_tracker_device_small" />
|
||||
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
@@ -120,9 +131,9 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:visibility="gone"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
style="@style/my_TextView_style_v2"
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
android:id="@+id/tv_subscription_history_subscription_state"
|
||||
style="@style/my_TextView_style_v2"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="@dimen/dp_6"
|
||||
android:text="@string/app_name"
|
||||
android:textSize="@dimen/textSize14"
|
||||
app:typeface="@string/roboto_regular_font" />
|
||||
@@ -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" />
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
android:id="@+id/tv_subscription_history_annual_care"
|
||||
@@ -50,8 +49,8 @@
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
android:layout_toEndOf="@id/tv_subscription_history_annual_care_title"
|
||||
android:text="@string/app_name"
|
||||
android:visibility="gone"
|
||||
android:textSize="@dimen/textSize14"
|
||||
android:visibility="gone"
|
||||
app:typeface="@string/roboto_regular_font" />
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
@@ -66,17 +65,17 @@
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
android:id="@+id/tv_subscription_history_package_price"
|
||||
style="@style/my_TextView_style_v2"
|
||||
android:layout_below="@id/tv_subscription_history_package_name"
|
||||
android:layout_alignBaseline="@id/tv_subscription_history_package_name"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:text="@string/txt_order_id"
|
||||
android:textSize="@dimen/textSize14"
|
||||
android:textSize="@dimen/textSize16"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceRoundButton
|
||||
android:id="@+id/btn_subscription_history_operate"
|
||||
style="@style/my_TextView_style_v2"
|
||||
android:layout_alignBaseline="@id/tv_subscription_history_package_price"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:paddingHorizontal="@dimen/dp_14"
|
||||
android:paddingVertical="@dimen/dp_6"
|
||||
android:text="@string/txt_refund"
|
||||
@@ -85,4 +84,83 @@
|
||||
app:qmui_borderColor="@color/block_color"
|
||||
app:qmui_borderWidth="@dimen/dp_1"
|
||||
app:qmui_radius="@dimen/dp_50" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/cl_subscription_history_refund_item"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_47"
|
||||
android:layout_below="@id/tv_subscription_history_package_name"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:background="@drawable/selector_transparent_pressed"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
style="@style/my_TextView_style_v2"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/txt_refund"
|
||||
android:textSize="@dimen/textSize14"
|
||||
app:typeface="@string/roboto_bold_font" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
android:id="@+id/tv_subscription_history_refund_result"
|
||||
style="@style/my_TextView_style_v2"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/block_color2"
|
||||
android:textSize="@dimen/textSize14"
|
||||
app:typeface="@string/roboto_regular_font" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_subscription_history_refund_arrow"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ico_list_next" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_47"
|
||||
android:id="@+id/ll_subscription_history_auto_renew_item"
|
||||
android:layout_below="@id/cl_subscription_history_refund_item"
|
||||
android:background="@drawable/selector_transparent_pressed"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
style="@style/my_TextView_style_v2"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/txt_auto_renew2"
|
||||
android:textSize="@dimen/textSize14"
|
||||
app:typeface="@string/roboto_bold_font" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
android:id="@+id/tv_subscription_history_auto_renew_result"
|
||||
style="@style/my_TextView_style_v2"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_16"
|
||||
android:textAllCaps="true"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/block_color2"
|
||||
android:textSize="@dimen/textSize14"
|
||||
app:typeface="@string/roboto_regular_font" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ico_list_next" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</RelativeLayout>
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
|
||||
45
app/src/main/res/layout/layout_refund_state_item.xml
Normal file
45
app/src/main/res/layout/layout_refund_state_item.xml
Normal file
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<!-- 节点圆圈 -->
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_refund_state_step_dot"
|
||||
android:layout_width="@dimen/dp_20"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:src="@drawable/selector_refund_state_step_dot" />
|
||||
|
||||
<!-- 下面的竖线 -->
|
||||
<View
|
||||
android:id="@+id/view_refund_state_step_line"
|
||||
android:layout_width="@dimen/dp_2"
|
||||
android:layout_height="@dimen/dp_26"
|
||||
android:layout_below="@id/iv_refund_state_step_dot"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:background="@color/slope_bg" />
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
android:id="@+id/tv_refund_state_step_title"
|
||||
style="@style/my_TextView_style_v2"
|
||||
android:layout_marginStart="@dimen/dp_10"
|
||||
android:layout_toEndOf="@id/iv_refund_state_step_dot"
|
||||
android:gravity="start"
|
||||
android:text="@string/txt_refund_status"
|
||||
android:textSize="@dimen/textSize14"
|
||||
app:typeface="@string/roboto_regular_font" />
|
||||
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
android:id="@+id/tv_refund_state_step_desc"
|
||||
style="@style/my_TextView_style_v2"
|
||||
android:layout_below="@id/tv_refund_state_step_title"
|
||||
android:layout_alignStart="@id/tv_refund_state_step_title"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:gravity="start"
|
||||
android:text="@string/txt_refund_status"
|
||||
android:textSize="@dimen/textSize10"
|
||||
app:typeface="@string/roboto_regular_font" />
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -1,52 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingStart="@dimen/dp_36"
|
||||
android:paddingTop="@dimen/dp_18"
|
||||
android:paddingEnd="@dimen/dp_36"
|
||||
android:paddingBottom="@dimen/dp_18">
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
android:id="@+id/auto_recharge_title"
|
||||
style="@style/my_TextView_style"
|
||||
android:layout_width="wrap_content"
|
||||
android:gravity="start"
|
||||
android:text="@string/txt_auto_recharge_title"
|
||||
android:textSize="@dimen/textSize24"
|
||||
app:typeface="@string/roboto_bold_font" />
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceTextView
|
||||
android:id="@+id/auto_recharge_content"
|
||||
style="@style/my_TextView_style"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_below="@id/auto_recharge_title"
|
||||
android:layout_marginTop="@dimen/dp_8"
|
||||
android:gravity="start"
|
||||
android:text="@string/txt_auto_recharge_content"
|
||||
android:textColor="@color/text_gray_color"
|
||||
android:textSize="@dimen/textSize16"
|
||||
app:typeface="@string/roboto_regular_font" />
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceRoundButton
|
||||
android:id="@+id/btn_off_auto_recharge"
|
||||
style="@style/my_QMUIRoundButton_small_style"
|
||||
android:layout_height="@dimen/dp_47"
|
||||
android:layout_below="@id/auto_recharge_content"
|
||||
android:layout_marginTop="@dimen/dp_24"
|
||||
android:text="@string/txt_cancel"
|
||||
app:qmui_borderColor="@color/txt_button"
|
||||
app:qmui_borderWidth="0.55dp"
|
||||
app:typeface="@string/roboto_bold_font" />
|
||||
|
||||
<com.abbidot.tracker.widget.TypefaceRoundButton
|
||||
android:id="@+id/btn_off_auto_recharge_cancel"
|
||||
style="@style/my_QMUIRoundButton_small_style"
|
||||
android:layout_alignTop="@id/btn_off_auto_recharge"
|
||||
android:layout_alignBottom="@id/btn_off_auto_recharge"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:text="@string/txt_sure"
|
||||
app:qmui_backgroundColor="@color/btn_yellow_color"
|
||||
app:typeface="@string/roboto_bold_font" />
|
||||
</RelativeLayout>
|
||||
@@ -382,4 +382,5 @@
|
||||
<color name="grey_color_92">#758E94</color>
|
||||
<color name="orange_color5">#FF996E</color>
|
||||
<color name="orange_color6">#FEF6E4</color>
|
||||
<color name="blue_color11">#0099CC</color>
|
||||
</resources>
|
||||
@@ -164,7 +164,7 @@
|
||||
<string name="txt_bluetooth_radar">Bluetooth Radar</string>
|
||||
<string name="txt_fence_saved">Saved. Active when online.</string>
|
||||
<string name="txt_refund_expired">Refund period has expired</string>
|
||||
<string name="txt_refund_policy">Refund Policy\n</string>
|
||||
<string name="txt_refund_policy">Refund Policy</string>
|
||||
<string name="txt_automatic_refund">Automatic Refund (Within 48 Hours)</string>
|
||||
<string name="txt_automatic_refund_dec">All subscription purchases are eligible for a full automatic refund within 48 hours of payment. Refunds will be processed automatically without manual review.\n</string>
|
||||
<string name="txt_standard_refund">Standard Refund Window (30 Days)</string>
|
||||
@@ -1000,4 +1000,36 @@
|
||||
<string name="txt_remove">Remove</string>
|
||||
<string name="txt_turn_off_remove">Turn Off & Remove</string>
|
||||
<string name="txt_no_legal_app">Unauthorized app. Download from official sources</string>
|
||||
|
||||
<string name="txt_auto_renew2">Auto-Renewal</string>
|
||||
<string name="txt_unavailable">Unavailable</string>
|
||||
<string name="txt_available">Available</string>
|
||||
<string name="txt_under_review">Under Review</string>
|
||||
<string name="txt_processing">Processing</string>
|
||||
<string name="txt_failed">Failed</string>
|
||||
<string name="txt_declined">Declined</string>
|
||||
<string name="txt_turn_off_auto_renew">Turn off auto-renew?</string>
|
||||
<string name="txt_turn_on_auto_renew">Turn on auto-renew?</string>
|
||||
<string name="txt_refund_pending_tips">Your refund request has been submitted and is being reviewed.</string>
|
||||
<string name="txt_plan_active_until_expires">Your plan stays active until it expires.</string>
|
||||
<string name="txt_refund_details">Refund details</string>
|
||||
<string name="txt_plan1">Plan</string>
|
||||
<string name="txt_order_id1">Order ID</string>
|
||||
<string name="txt_order_time">Order Time</string>
|
||||
<string name="txt_paid_method">Paid Method</string>
|
||||
<string name="txt_refund_amount">Refund Amount</string>
|
||||
<string name="txt_refund_status">Refund Status</string>
|
||||
<string name="txt_refund_processing">Refund Processing</string>
|
||||
<string name="txt_refund_processing_tips">Your refund has been approved and is being processed.</string>
|
||||
<string name="txt_refund_completed">Refund Completed</string>
|
||||
<string name="txt_refund_unsuccessful">Refund Unsuccessful</string>
|
||||
<string name="txt_refund_success_tips">Your refund has been sent to your original payment method.</string>
|
||||
<string name="txt_refund_fail_tips">Your refund request was not approved.</string>
|
||||
<string name="txt_request_submit_dec">Your refund request has been submitted.</string>
|
||||
<string name="txt_request_submit">Request Submitted</string>
|
||||
<string name="txt_under_review_dec">Your refund request is being reviewed.</string>
|
||||
<string name="txt_refund_failed_dec">We couldn\'t complete your refund. Please try again or contact support.</string>
|
||||
<string name="txt_refund_failed">Refund Failed</string>
|
||||
<string name="txt_refund_declined">Refund Declined</string>
|
||||
<string name="txt_refund_pending">Refund Pending</string>
|
||||
</resources>
|
||||
@@ -256,4 +256,13 @@
|
||||
<!-- <item name="colorPrimary">@color/my_light_primary</item> -->
|
||||
</style>
|
||||
|
||||
<style name="MyBottomSheetStyle" parent="Theme.Design.Light.BottomSheetDialog">
|
||||
<item name="bottomSheetStyle">@style/bottomSheetWrapper</item>
|
||||
</style>
|
||||
|
||||
<style name="bottomSheetWrapper" parent="Widget.Design.BottomSheet.Modal">
|
||||
<item name="android:background">@android:color/transparent</item>
|
||||
</style>
|
||||
|
||||
|
||||
</resources>
|
||||
@@ -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==
|
||||
|
||||
Reference in New Issue
Block a user