1.修复充电中,Map 显示Off, 但设备管理中显示Strong signal bug

2.修复GPS 没信号还是为绿点bug
3.超过30天后,退款按钮呈灰色不可点,点击后提示“Refund period has expired”,续订订单不显示按钮
4.历史订单列表页,增加退款说明
This commit is contained in:
yezhiqiu
2026-04-29 10:27:29 +08:00
parent 8d1a44bf89
commit 587697954d
21 changed files with 297 additions and 71 deletions

View File

@@ -28,9 +28,9 @@ android {
applicationId "com.abbidot.tracker" applicationId "com.abbidot.tracker"
minSdkVersion 23 minSdkVersion 23
targetSdkVersion 35 targetSdkVersion 35
versionCode 2202 versionCode 2203
versionName "2.2.2" // versionName "2.2.3"
// versionName "2.2.2-Beta7" versionName "2.2.3-Beta1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

View File

@@ -1,12 +1,13 @@
package com.abbidot.tracker.adapter package com.abbidot.tracker.adapter
import android.graphics.Typeface import android.graphics.Typeface
import android.widget.ImageView import android.util.TypedValue
import androidx.appcompat.widget.AppCompatImageView import androidx.appcompat.widget.AppCompatImageView
import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat
import com.abbidot.baselibrary.util.AppUtils import com.abbidot.baselibrary.util.AppUtils
import com.abbidot.tracker.R import com.abbidot.tracker.R
import com.abbidot.tracker.bean.MenuTxtBean import com.abbidot.tracker.bean.MenuTxtBean
import com.abbidot.tracker.constant.ConstantInt
import com.abbidot.tracker.constant.MultipleEntity import com.abbidot.tracker.constant.MultipleEntity
import com.abbidot.tracker.widget.TypefaceTextView import com.abbidot.tracker.widget.TypefaceTextView
import com.chad.library.adapter.base.BaseMultiItemQuickAdapter import com.chad.library.adapter.base.BaseMultiItemQuickAdapter
@@ -32,6 +33,8 @@ class HelpTextImageTypeAdapter(list: MutableList<MenuTxtBean>?) :
addItemType(MultipleEntity.IMG_IMG, R.layout.layout_help_title1) addItemType(MultipleEntity.IMG_IMG, R.layout.layout_help_title1)
//显示14sp大小的文字内容 //显示14sp大小的文字内容
addItemType(MultipleEntity.IMG_TEXT_IMG, R.layout.layout_help_title2) addItemType(MultipleEntity.IMG_TEXT_IMG, R.layout.layout_help_title2)
//显示多大字体,是否粗体,字体颜色
addItemType(MultipleEntity.TEXT_TEXT_IMG, R.layout.layout_help_title2)
} }
override fun convert(holder: BaseViewHolder, item: MenuTxtBean) { override fun convert(holder: BaseViewHolder, item: MenuTxtBean) {
@@ -67,6 +70,23 @@ class HelpTextImageTypeAdapter(list: MutableList<MenuTxtBean>?) :
holder.getView<TypefaceTextView>(R.id.tv_help_title_two).text = item.menuName holder.getView<TypefaceTextView>(R.id.tv_help_title_two).text = item.menuName
holder.itemView.setPadding(0, AppUtils.dpToPx(14), 0, 0) holder.itemView.setPadding(0, AppUtils.dpToPx(14), 0, 0)
} }
MultipleEntity.TEXT_TEXT_IMG -> {
holder.getView<TypefaceTextView>(R.id.tv_help_title_two).apply {
//是否粗体
val typefaceBold =
if (item.isSwitch) Typeface.create(Typeface.DEFAULT, Typeface.BOLD)
else Typeface.create(Typeface.DEFAULT, Typeface.NORMAL)
typeface = typefaceBold
text = item.menuName
setTextSize(TypedValue.COMPLEX_UNIT_SP, item.state.toFloat())
val tColor = if (item.colorRedId == ConstantInt.Type0) R.color.data_black_color
else item.colorRedId
setTextColor(ContextCompat.getColor(context, tColor))
}
// holder.itemView.setPadding(0, AppUtils.dpToPx(14), 0, 0)
}
} }
} }

View File

@@ -1,5 +1,6 @@
package com.abbidot.tracker.adapter package com.abbidot.tracker.adapter
import android.content.Context
import android.content.Intent import android.content.Intent
import android.view.View import android.view.View
import android.widget.TextView import android.widget.TextView
@@ -16,6 +17,8 @@ import com.abbidot.tracker.ui.activity.subscribe.SubscriptionHistoryActivity
import com.abbidot.tracker.widget.TypefaceRoundButton import com.abbidot.tracker.widget.TypefaceRoundButton
import com.chad.library.adapter.base.BaseMultiItemQuickAdapter import com.chad.library.adapter.base.BaseMultiItemQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.hjq.toast.Toaster
import com.qmuiteam.qmui.widget.roundwidget.QMUIRoundButtonDrawable
/** /**
*Created by .yzq on 2024/8/19/019. *Created by .yzq on 2024/8/19/019.
@@ -114,35 +117,39 @@ class SubscriptionHistoryAdapter(
visibility = View.VISIBLE visibility = View.VISIBLE
when (item.orderStatus) { when (item.orderStatus) {
1 -> { 1 -> {
if (item.isAutoRenewal == ConstantInt.Type1) {
visibility = View.GONE
} else {
setRefundState(context, item.isRefundable, this)
}
// val updateTimestamp = Utils.stringToTimestamp(item.updateTime, isUtc = true) // val updateTimestamp = Utils.stringToTimestamp(item.updateTime, isUtc = true)
// val nowTimestamp = System.currentTimeMillis() // val nowTimestamp = System.currentTimeMillis()
if (item.enabled == ConstantInt.Type0 || (item.surplusDays == 0L && item.subscriptionStatus == ConstantInt.Close)) { // if (item.enabled == ConstantInt.Type0 || (item.surplusDays == 0L && item.subscriptionStatus == ConstantInt.Close)) {
visibility = View.GONE // visibility = View.GONE
} else if (item.mealUnit == ConstantString.PackageUnitDay) { // } else if (item.mealUnit == ConstantString.PackageUnitDay) {
visibility = View.VISIBLE // visibility = View.VISIBLE
setText(R.string.txt_refund) // setText(R.string.txt_refund)
} else if (item.mealUnit == ConstantString.PackageUnitMonth) { // } else if (item.mealUnit == ConstantString.PackageUnitMonth) {
// val day7Timestamp = 7 * 24 * 60 * 60 * 1000L // val day7Timestamp = 7 * 24 * 60 * 60 * 1000L
//套餐超出7天不能退款 // //套餐超出7天不能退款
// if (nowTimestamp - updateTimestamp <= day7Timestamp) { // if (nowTimestamp - updateTimestamp <= day7Timestamp) {
if (item.isRefundable == ConstantInt.Type1) { // visibility = View.VISIBLE
visibility = View.VISIBLE // setText(R.string.txt_refund)
setText(R.string.txt_refund) // } else {
} else { // visibility = View.GONE
visibility = View.GONE // }
} // } else {
} else {
// val day30Timestamp = 30 * 24 * 60 * 60 * 1000L // val day30Timestamp = 30 * 24 * 60 * 60 * 1000L
//套餐超出30天不能退款 // //套餐超出30天不能退款
// if (nowTimestamp - updateTimestamp <= day30Timestamp) { // if (nowTimestamp - updateTimestamp <= day30Timestamp) {
if (item.isRefundable == ConstantInt.Type1) { // visibility = View.VISIBLE
visibility = View.VISIBLE // setText(R.string.txt_refund)
setText(R.string.txt_refund) // } else {
} else { // visibility = View.GONE
visibility = View.GONE // }
} // }
} // setTextColor(ContextCompat.getColor(context, R.color.select_color))
setTextColor(ContextCompat.getColor(context, R.color.select_color))
} }
4 -> setText(R.string.txt_waiting) 4 -> setText(R.string.txt_waiting)
@@ -160,6 +167,10 @@ class SubscriptionHistoryAdapter(
setChangeAlphaWhenPress(true) setChangeAlphaWhenPress(true)
setOnClickListener { setOnClickListener {
if (item.orderStatus == ConstantInt.Type1) { if (item.orderStatus == ConstantInt.Type1) {
if (item.isRefundable == ConstantInt.Type0) {
Toaster.show(R.string.txt_refund_expired)
return@setOnClickListener
}
Intent(context, RequestRefundActivity::class.java).apply { Intent(context, RequestRefundActivity::class.java).apply {
putExtra(ConstantString.SetMeal, item) putExtra(ConstantString.SetMeal, item)
mHistoryActivity.startActivity(this) mHistoryActivity.startActivity(this)
@@ -185,4 +196,24 @@ class SubscriptionHistoryAdapter(
} }
} }
private fun setRefundState(
context: Context, isRefundable: Int, roundButton: TypefaceRoundButton
) {
roundButton.apply {
var textColor = R.color.select_color
val strokeColor = if (isRefundable == ConstantInt.Type1) {
R.color.block_color
} else {
textColor = R.color.line_color1
R.color.permission_no_check_color
}
(background as QMUIRoundButtonDrawable).let {
it.setStroke(
it.strokeWidth, ContextCompat.getColor(context, strokeColor)
)
}
setTextColor(ContextCompat.getColor(context, textColor))
}
}
} }

View File

@@ -56,6 +56,7 @@ data class SubscriptionsOrderBean(
var refundTime: Long, var refundTime: Long,
var planTimeMonthsCount: Int, var planTimeMonthsCount: Int,
var isRefundable: Int,//是否显示退款按钮 1:是 0:否 var isRefundable: Int,//是否显示退款按钮 1:是 0:否
var isAutoRenewal: Int,//是否是自动续订 1:是 0:否
@MultipleEntity var menuType: Int, @MultipleEntity var menuType: Int,
var isUpdateOrder: Int = 0//是否是升级订单 1:是 0:否 var isUpdateOrder: Int = 0//是否是升级订单 1:是 0:否
) : Parcelable, MultiItemEntity { ) : Parcelable, MultiItemEntity {
@@ -103,6 +104,7 @@ data class SubscriptionsOrderBean(
0L, 0L,
0, 0,
0, 0,
0,
menuType, menuType,
0 0
) )
@@ -150,6 +152,8 @@ data class SubscriptionsOrderBean(
0L, 0L,
0L, 0L,
0, 0,
0,
0,
MultipleEntity.TEXT, MultipleEntity.TEXT,
0 0
) )

View File

@@ -373,8 +373,10 @@ class LedLightActivity : BaseActivity<ActivityLedLightBinding>(ActivityLedLightB
if (ilLedLightIssueLayout.root.isGone) { if (ilLedLightIssueLayout.root.isGone) {
YoYo.with(Techniques.BounceInUp).duration(700).onStart { YoYo.with(Techniques.BounceInUp).duration(700).onStart {
ilLedLightIssueLayout.root.visibility = View.VISIBLE ilLedLightIssueLayout.root.visibility = View.VISIBLE
vLedIssueShadeView.visibility = View.VISIBLE
}.playOn(ilLedLightIssueLayout.root) }.playOn(ilLedLightIssueLayout.root)
} else { } else {
vLedIssueShadeView.visibility = View.GONE
YoYo.with(Techniques.SlideOutDown).duration(600).onEnd { YoYo.with(Techniques.SlideOutDown).duration(600).onEnd {
ilLedLightIssueLayout.root.visibility = View.GONE ilLedLightIssueLayout.root.visibility = View.GONE
}.playOn(ilLedLightIssueLayout.root) }.playOn(ilLedLightIssueLayout.root)
@@ -414,7 +416,9 @@ class LedLightActivity : BaseActivity<ActivityLedLightBinding>(ActivityLedLightB
if (BleManager.getInstance().isConnected(deviceMacId)) { if (BleManager.getInstance().isConnected(deviceMacId)) {
//蓝牙控制 //蓝牙控制
SRBleUtil.instance.getConnectMacDevice(deviceMacId)?.let { SRBleUtil.instance.getConnectMacDevice(deviceMacId)?.let {
SRBleUtil.instance.setBleLedSwitch(this@LedLightActivity, it.bleDevice, ledSwitch) SRBleUtil.instance.setBleLedSwitch(
this@LedLightActivity, it.bleDevice, ledSwitch
)
} }
} else { } else {
//远程控制 //远程控制

View File

@@ -11,8 +11,6 @@ import com.abbidot.tracker.util.ViewUtil
class HelpCreatePetFenceActivity : class HelpCreatePetFenceActivity :
BaseActivity<ActivityHelpCreatePetFenceBinding>(ActivityHelpCreatePetFenceBinding::inflate) { BaseActivity<ActivityHelpCreatePetFenceBinding>(ActivityHelpCreatePetFenceBinding::inflate) {
private lateinit var mHelpCreateFenceAdapter: HelpTextImageTypeAdapter
override fun getTopBar() = mViewBinding.ilHelpCreatePetFenceBar.titleTopBar override fun getTopBar() = mViewBinding.ilHelpCreatePetFenceBar.titleTopBar
override fun initData() { override fun initData() {
@@ -46,9 +44,9 @@ class HelpCreatePetFenceActivity :
menuList, "", imageResId = R.drawable.create_fence_help4, menuType = MultipleEntity.IMG menuList, "", imageResId = R.drawable.create_fence_help4, menuType = MultipleEntity.IMG
) )
mHelpCreateFenceAdapter = HelpTextImageTypeAdapter(menuList) val helpCreateFenceAdapter = HelpTextImageTypeAdapter(menuList)
ViewUtil.instance.setRecyclerViewVerticalLinearLayout( ViewUtil.instance.setRecyclerViewVerticalLinearLayout(
mContext, mViewBinding.rvHelpCreatePetFenceContent, mHelpCreateFenceAdapter mContext, mViewBinding.rvHelpCreatePetFenceContent, helpCreateFenceAdapter
) )
} }
} }

View File

@@ -11,7 +11,6 @@ import com.abbidot.tracker.util.ViewUtil
class HelpTrackerBatteryActivity : class HelpTrackerBatteryActivity :
BaseActivity<ActivityHelpTrackerBatteryBinding>(ActivityHelpTrackerBatteryBinding::inflate) { BaseActivity<ActivityHelpTrackerBatteryBinding>(ActivityHelpTrackerBatteryBinding::inflate) {
private lateinit var mHelpBatteryAdapter: HelpTextImageTypeAdapter
override fun getTopBar() = mViewBinding.ilHelpTrackerBatteryBar.titleTopBar override fun getTopBar() = mViewBinding.ilHelpTrackerBatteryBar.titleTopBar
@@ -69,10 +68,7 @@ class HelpTrackerBatteryActivity :
menuType = MultipleEntity.IMG_IMG menuType = MultipleEntity.IMG_IMG
) )
ViewUtil.instance.addMenuBean( ViewUtil.instance.addMenuBean(
menuList, menuList, "", imageResId = R.drawable.battery_life_help3, menuType = MultipleEntity.IMG
"",
imageResId = R.drawable.battery_life_help3,
menuType = MultipleEntity.IMG
) )
ViewUtil.instance.addMenuBean(menuList, getString(R.string.txt_gps_update_interval)) ViewUtil.instance.addMenuBean(menuList, getString(R.string.txt_gps_update_interval))
@@ -87,10 +83,7 @@ class HelpTrackerBatteryActivity :
menuType = MultipleEntity.IMG_TEXT_IMG menuType = MultipleEntity.IMG_TEXT_IMG
) )
ViewUtil.instance.addMenuBean( ViewUtil.instance.addMenuBean(
menuList, menuList, "", imageResId = R.drawable.battery_life_help4, menuType = MultipleEntity.IMG
"",
imageResId = R.drawable.battery_life_help4,
menuType = MultipleEntity.IMG
) )
ViewUtil.instance.addMenuBean(menuList, getString(R.string.txt_in_live_mode)) ViewUtil.instance.addMenuBean(menuList, getString(R.string.txt_in_live_mode))
@@ -106,15 +99,12 @@ class HelpTrackerBatteryActivity :
menuType = MultipleEntity.IMG_IMG menuType = MultipleEntity.IMG_IMG
) )
ViewUtil.instance.addMenuBean( ViewUtil.instance.addMenuBean(
menuList, menuList, "", imageResId = R.drawable.battery_life_help5, menuType = MultipleEntity.IMG
"",
imageResId = R.drawable.battery_life_help5,
menuType = MultipleEntity.IMG
) )
mHelpBatteryAdapter = HelpTextImageTypeAdapter(menuList) val helpBatteryAdapter = HelpTextImageTypeAdapter(menuList)
ViewUtil.instance.setRecyclerViewVerticalLinearLayout( ViewUtil.instance.setRecyclerViewVerticalLinearLayout(
mContext, mViewBinding.rvHelpTrackerBatteryContent, mHelpBatteryAdapter mContext, mViewBinding.rvHelpTrackerBatteryContent, helpBatteryAdapter
) )
} }
} }

View File

@@ -1,12 +1,16 @@
package com.abbidot.tracker.ui.activity.subscribe package com.abbidot.tracker.ui.activity.subscribe
import android.view.View
import androidx.activity.viewModels import androidx.activity.viewModels
import androidx.core.view.isGone
import com.abbidot.baselibrary.constant.EventName import com.abbidot.baselibrary.constant.EventName
import com.abbidot.baselibrary.eventbus.XEventBus import com.abbidot.baselibrary.eventbus.XEventBus
import com.abbidot.baselibrary.util.AppUtils import com.abbidot.baselibrary.util.AppUtils
import com.abbidot.tracker.R import com.abbidot.tracker.R
import com.abbidot.tracker.adapter.HelpTextImageTypeAdapter
import com.abbidot.tracker.adapter.SubscriptionHistoryAdapter import com.abbidot.tracker.adapter.SubscriptionHistoryAdapter
import com.abbidot.tracker.base.BaseActivity import com.abbidot.tracker.base.BaseActivity
import com.abbidot.tracker.bean.MenuTxtBean
import com.abbidot.tracker.bean.SubscriptionsOrderBean import com.abbidot.tracker.bean.SubscriptionsOrderBean
import com.abbidot.tracker.constant.ConstantInt import com.abbidot.tracker.constant.ConstantInt
import com.abbidot.tracker.constant.ConstantString import com.abbidot.tracker.constant.ConstantString
@@ -15,6 +19,8 @@ import com.abbidot.tracker.constant.MultipleEntity
import com.abbidot.tracker.databinding.ActivitySubscriptionHistoryBinding import com.abbidot.tracker.databinding.ActivitySubscriptionHistoryBinding
import com.abbidot.tracker.util.ViewUtil import com.abbidot.tracker.util.ViewUtil
import com.abbidot.tracker.vm.SubscriptionManageViewModel import com.abbidot.tracker.vm.SubscriptionManageViewModel
import com.daimajia.androidanimations.library.Techniques
import com.daimajia.androidanimations.library.YoYo
class SubscriptionHistoryActivity : class SubscriptionHistoryActivity :
BaseActivity<ActivitySubscriptionHistoryBinding>(ActivitySubscriptionHistoryBinding::inflate) { BaseActivity<ActivitySubscriptionHistoryBinding>(ActivitySubscriptionHistoryBinding::inflate) {
@@ -34,15 +40,78 @@ class SubscriptionHistoryActivity :
setLeftBackImage(R.drawable.icon_white_back_svg) setLeftBackImage(R.drawable.icon_white_back_svg)
mHistoryAdapter = SubscriptionHistoryAdapter(mSubscriptionsOrderList) mHistoryAdapter = SubscriptionHistoryAdapter(mSubscriptionsOrderList)
intent?.extras?.apply {
subscriptionId = getString(ConstantString.Id, "")
}
mViewBinding.apply { mViewBinding.apply {
ViewUtil.instance.setRecyclerViewVerticalLinearLayout( ViewUtil.instance.setRecyclerViewVerticalLinearLayout(
mContext, rvSubscriptionHistoryList, mHistoryAdapter, bottom = AppUtils.dpToPx(12) mContext, rvSubscriptionHistoryList, mHistoryAdapter, bottom = AppUtils.dpToPx(12)
) )
setOnClickListenerViews(btnSubscriptionRefundIssue, tvCloseRefundIssueBtn)
} }
intent?.extras?.apply { initIssue()
subscriptionId = getString(ConstantString.Id, "")
} }
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() { override fun onResume() {
@@ -78,4 +147,31 @@ class SubscriptionHistoryActivity :
}) })
} }
} }
/**
* 显示问题
*/
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)
}
}
}
override fun onClick(v: View?) {
mViewBinding.apply {
when (v!!) {
btnSubscriptionRefundIssue, tvCloseRefundIssueBtn -> showLedIssue()
}
}
}
} }

View File

@@ -157,8 +157,11 @@ class RouteV3Fragment : BaseFragment<FragmentRouteV3Binding>(FragmentRouteV3Bind
llMapRouteLineV3ZoomingLayout.setOnTouchListener { _, event -> llMapRouteLineV3ZoomingLayout.setOnTouchListener { _, event ->
if (rlMapRouteLineV3TimeLayout.isVisible) { if (rlMapRouteLineV3TimeLayout.isVisible) {
//获取初始高度
if (mTotalHeight == 0) { if (mTotalHeight == 0) {
mTotalHeight = cvHomeRouteV3Card.height + svHomeRouteMapScroll.height mTotalHeight = cvHomeRouteV3Card.height + svHomeRouteMapScroll.height
}
if (mLastScrollViewHeight == 0 && mHistoryFenceAdapter.getData().size == 1) {
mCalendarLayoutHaveSeekBarHeight = rlHomeRouteCalendarV3Layout.height mCalendarLayoutHaveSeekBarHeight = rlHomeRouteCalendarV3Layout.height
mLastScrollViewHeight = svHomeRouteMapScroll.height mLastScrollViewHeight = svHomeRouteMapScroll.height
} }

View File

@@ -667,14 +667,14 @@ class HomeTrackFragment :
mTrackStateList[1].let { mTrackStateList[1].let {
it.colorRedId = R.color.blue_color1 it.colorRedId = R.color.blue_color1
it.menuValue = it.menuValue =
if (isTimeoutReport || powerSwitch == ConstantInt.Type0 || powerSwitch == ConstantInt.Type2 || inWifiZone == ConstantInt.Type1) { if (isTimeoutReport || powerSwitch == ConstantInt.Type0 || powerSwitch == ConstantInt.Type2 || powerSwitch == ConstantInt.Type3 || inWifiZone == ConstantInt.Type1) {
it.colorRedId = R.color.orange_color3 it.colorRedId = R.color.orange_color3
getString(R.string.tracker_manage_set_led_off) getString(R.string.tracker_manage_set_led_off)
} else if (gpsSignal > ConstantInt.WeakSignal) { } else if (gpsSignal > ConstantInt.WeakSignal) getString(R.string.txt_strong_signal)
getString(R.string.txt_strong_signal) else if (gpsSignal == ConstantInt.NoSignal) {
} else { it.colorRedId = R.color.orange_color3
getString(R.string.txt_weak_signal) getString(R.string.txt_no_signal)
} } else getString(R.string.txt_weak_signal)
} }
mTrackStateList[2].let { mTrackStateList[2].let {
it.menuValue = it.menuValue =
@@ -1172,7 +1172,9 @@ class HomeTrackFragment :
if (BleManager.getInstance().isConnected(it.deviceMacId)) { if (BleManager.getInstance().isConnected(it.deviceMacId)) {
//蓝牙控制 //蓝牙控制
getBleTrackDeviceBean(false)?.let { ble -> getBleTrackDeviceBean(false)?.let { ble ->
SRBleUtil.instance.setBleLedSwitch(getHomeV2Activity()!!, ble.bleDevice, ledSwitch) SRBleUtil.instance.setBleLedSwitch(
getHomeV2Activity()!!, ble.bleDevice, ledSwitch
)
} }
} else { } else {
// setLedState(ledSwitch) // setLedState(ledSwitch)

View File

@@ -830,12 +830,16 @@ class ViewUtil private constructor() {
colorRedId: Int = R.color.orange_color3, colorRedId: Int = R.color.orange_color3,
isSwitch: Boolean = false, isSwitch: Boolean = false,
type: Int = ConstantInt.Type0, type: Int = ConstantInt.Type0,
state: Int = ConstantInt.Type0,
@MultipleEntity menuType: Int = MultipleEntity.TEXT @MultipleEntity menuType: Int = MultipleEntity.TEXT
) { ) {
val menuTxtBean = MenuTxtBean(name, value, menuType) val menuTxtBean = MenuTxtBean(name, value, menuType)
if (imageResId > 0) { if (imageResId > 0) {
menuTxtBean.imageId = imageResId menuTxtBean.imageId = imageResId
} }
if (state > 0) {
menuTxtBean.state = state
}
if (!TextUtils.isEmpty(imageUrl)) { if (!TextUtils.isEmpty(imageUrl)) {
menuTxtBean.imageUrl = imageUrl menuTxtBean.imageUrl = imageUrl
} }

View File

@@ -346,7 +346,10 @@ class MapViewModel : ViewModel() {
menuType = ConstantInt.Close menuType = ConstantInt.Close
context.getString(R.string.tracker_manage_set_led_off) context.getString(R.string.tracker_manage_set_led_off)
} else if (it.gpsSignal > ConstantInt.WeakSignal) context.getString(R.string.txt_strong_signal) } else if (it.gpsSignal > ConstantInt.WeakSignal) context.getString(R.string.txt_strong_signal)
else if (it.gpsSignal == ConstantInt.NoSignal) context.getString(R.string.txt_no_signal) else if (it.gpsSignal == ConstantInt.NoSignal) {
menuType = ConstantInt.Close
context.getString(R.string.txt_no_signal)
}
else context.getString(R.string.txt_weak_signal) else context.getString(R.string.txt_weak_signal)
value = context.getString(R.string.tracker_manage_set_gps) + "$gpsValue" value = context.getString(R.string.tracker_manage_set_gps) + "$gpsValue"
} }

View File

@@ -23,9 +23,9 @@
android:paddingHorizontal="@dimen/dp_14" android:paddingHorizontal="@dimen/dp_14"
android:paddingVertical="@dimen/dp_6" android:paddingVertical="@dimen/dp_6"
android:text="@string/acccount_btn_save" android:text="@string/acccount_btn_save"
android:visibility="gone"
android:textColor="@color/btn_color" android:textColor="@color/btn_color"
android:textSize="@dimen/textSize12" android:textSize="@dimen/textSize12"
android:visibility="gone"
app:qmui_radius="@dimen/dp_100" app:qmui_radius="@dimen/dp_100"
app:typeface="@string/roboto_bold_font" /> app:typeface="@string/roboto_bold_font" />
@@ -111,9 +111,9 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:visibility="gone"
android:layout_centerVertical="true" android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/dp_36" /> android:layout_marginEnd="@dimen/dp_36"
android:visibility="gone" />
</RelativeLayout> </RelativeLayout>
@@ -179,6 +179,13 @@
</androidx.appcompat.widget.LinearLayoutCompat> </androidx.appcompat.widget.LinearLayoutCompat>
</androidx.core.widget.NestedScrollView> </androidx.core.widget.NestedScrollView>
<View
android:id="@+id/v_led_issue_shade_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/transparent_half"
android:visibility="gone" />
<include <include
android:id="@+id/il_led_light_issue_layout" android:id="@+id/il_led_light_issue_layout"
layout="@layout/layout_live_issue" layout="@layout/layout_live_issue"

View File

@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android" <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" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
@@ -11,10 +11,64 @@
android:id="@+id/il_subscription_history_top_bar" android:id="@+id/il_subscription_history_top_bar"
layout="@layout/layout_top_bar" /> layout="@layout/layout_top_bar" />
<com.abbidot.tracker.widget.TypefaceRoundButton
android:id="@+id/btn_subscription_refund_issue"
android:layout_width="@dimen/dp_24"
android:layout_height="@dimen/dp_24"
android:layout_alignBottom="@id/il_subscription_history_top_bar"
android:layout_alignParentEnd="true"
android:layout_marginEnd="@dimen/dp_20"
android:layout_marginBottom="@dimen/dp_16"
android:gravity="center"
android:text="\?"
android:textColor="@color/block_color2"
android:textSize="@dimen/textSize12"
app:qmui_backgroundColor="@color/transparent"
app:qmui_borderColor="@color/block_color2"
app:qmui_borderWidth="@dimen/dp_1" />
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_subscription_history_list" android:id="@+id/rv_subscription_history_list"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_below="@id/il_subscription_history_top_bar"
android:paddingHorizontal="@dimen/dp_20" android:paddingHorizontal="@dimen/dp_20"
android:paddingVertical="@dimen/dp_12" /> 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> </androidx.appcompat.widget.LinearLayoutCompat>
</RelativeLayout>

View File

@@ -64,7 +64,7 @@
style="@style/my_TextView_style_v2" style="@style/my_TextView_style_v2"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginTop="@dimen/dp_30" android:layout_marginTop="@dimen/dp_30"
android:layout_marginBottom="@dimen/dp_34" android:layout_marginBottom="@dimen/dp_18"
android:background="@drawable/selector_transparent_pressed" android:background="@drawable/selector_transparent_pressed"
android:padding="@dimen/dp_16" android:padding="@dimen/dp_16"
android:text="@string/txt_close" android:text="@string/txt_close"

View File

@@ -14,6 +14,7 @@
android:layout_marginTop="@dimen/dp_10" android:layout_marginTop="@dimen/dp_10"
android:layout_marginEnd="@dimen/dp_42" android:layout_marginEnd="@dimen/dp_42"
android:drawablePadding="@dimen/dp_2" android:drawablePadding="@dimen/dp_2"
android:gravity="start"
android:textSize="@dimen/textSize16" android:textSize="@dimen/textSize16"
app:typeface="@string/roboto_regular_font" /> app:typeface="@string/roboto_regular_font" />
@@ -24,6 +25,7 @@
android:layout_below="@id/tv_pet_location_reverse_geocode" android:layout_below="@id/tv_pet_location_reverse_geocode"
android:layout_marginTop="@dimen/dp_2" android:layout_marginTop="@dimen/dp_2"
android:layout_marginBottom="@dimen/dp_12" android:layout_marginBottom="@dimen/dp_12"
android:gravity="start"
android:textColor="@color/select_color3" android:textColor="@color/select_color3"
android:textSize="@dimen/textSize12" android:textSize="@dimen/textSize12"
app:typeface="@string/roboto_regular_font" /> app:typeface="@string/roboto_regular_font" />

View File

@@ -950,7 +950,7 @@
<string name="txt_renewal_day">Verlängerung: $%s/%s Tag am %s</string> <string name="txt_renewal_day">Verlängerung: $%s/%s Tag am %s</string>
<string name="txt_day_unit">/Tag x%s</string> <string name="txt_day_unit">/Tag x%s</string>
<string name="txt_location_tip">Die ABBIDOT-App sammelt Standortdaten. Die Route und Entfernung zwischen dem aktuellen Standort und dem Gerät können berechnet werden.</string> <string name="txt_location_tip">Die ABBIDOT-App sammelt Standortdaten. Die Route und Entfernung zwischen dem aktuellen Standort und dem Gerät können berechnet werden.</string>
<string name="txt_auto_subscription_day">(Verlängerung für $%s pro %s Tag danach)</string> <string name="txt_auto_subscription_day">(Verlängerung für $%s pro Tag danach)</string>
<string name="txt_auto_subscription_days">(Verlängerung für $%s/%s Tage danach)</string> <string name="txt_auto_subscription_days">(Verlängerung für $%s/%s Tage danach)</string>
<string name="txt_auto_subscription_years">(Verlängerung für $%s/%s Jahre danach)</string> <string name="txt_auto_subscription_years">(Verlängerung für $%s/%s Jahre danach)</string>
<string name="txt_auto_subscription_months">(Verlängerung für $%s/%s Monate danach)</string> <string name="txt_auto_subscription_months">(Verlängerung für $%s/%s Monate danach)</string>

View File

@@ -994,7 +994,7 @@
<string name="txt_renewal_day">续费:$%s/%s天于%s</string> <string name="txt_renewal_day">续费:$%s/%s天于%s</string>
<string name="txt_day_unit">/天 x%s</string> <string name="txt_day_unit">/天 x%s</string>
<string name="txt_location_tip">ABBIDOT应用收集位置数据可计算当前位置与设备之间的路线和距离。</string> <string name="txt_location_tip">ABBIDOT应用收集位置数据可计算当前位置与设备之间的路线和距离。</string>
<string name="txt_auto_subscription_day">(之后按$%s每%s天续费)</string> <string name="txt_auto_subscription_day">(之后按$%s每天续费</string>
<string name="txt_auto_subscription_days">(之后按$%s/%s天续费</string> <string name="txt_auto_subscription_days">(之后按$%s/%s天续费</string>
<string name="txt_auto_subscription_years">(之后按$%s/%s年续费</string> <string name="txt_auto_subscription_years">(之后按$%s/%s年续费</string>
<string name="txt_auto_subscription_months">(之后按$%s/%s月续费</string> <string name="txt_auto_subscription_months">(之后按$%s/%s月续费</string>

View File

@@ -8,6 +8,7 @@
<!-- 透明色 --> <!-- 透明色 -->
<color name="transparent">#00000000</color> <color name="transparent">#00000000</color>
<color name="transparent_half">#80000000</color>
<!-- 白色 --> <!-- 白色 -->
<color name="white">#FFFFFFFF</color> <color name="white">#FFFFFFFF</color>

View File

@@ -1051,7 +1051,7 @@
<string name="txt_renewal_day">Renewal: $%s/%s day on %s</string> <string name="txt_renewal_day">Renewal: $%s/%s day on %s</string>
<string name="txt_day_unit">/day x%s</string> <string name="txt_day_unit">/day x%s</string>
<string name="txt_location_tip">ABBIDOT APP collects location data,The route and distance between the current location and the device can be calculated.</string> <string name="txt_location_tip">ABBIDOT APP collects location data,The route and distance between the current location and the device can be calculated.</string>
<string name="txt_auto_subscription_day">(Renew at $%s per %s day thereafter)</string> <string name="txt_auto_subscription_day">(Renew at $%s per day thereafter)</string>
<string name="txt_auto_subscription_days">(Renew at $%s/%s days thereafter)</string> <string name="txt_auto_subscription_days">(Renew at $%s/%s days thereafter)</string>
<string name="txt_auto_subscription_years">(Renew at $%s/%s years thereafter)</string> <string name="txt_auto_subscription_years">(Renew at $%s/%s years thereafter)</string>
<string name="txt_auto_subscription_months">(Renew at $%s/%s months thereafter)</string> <string name="txt_auto_subscription_months">(Renew at $%s/%s months thereafter)</string>
@@ -1082,5 +1082,13 @@
<string name="txt_renewal_years">Renewal: $%s/%s years on %s</string> <string name="txt_renewal_years">Renewal: $%s/%s years on %s</string>
<string name="txt_renewal_months">Renewal: $%s/%s months on %s</string> <string name="txt_renewal_months">Renewal: $%s/%s months on %s</string>
<string name="map_baidu_map">Baidu Map</string> <string name="map_baidu_map">Baidu Map</string>
<string name="txt_refund_expired">Refund period has expired</string>
<string name="txt_refund_policy">Refund Policy\n</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>
<string name="txt_standard_refund_dec">After the initial 48-hour period, users may request a refund within 30 days of purchase.\n\t1.All subscription plans (3-Month, 1-Year, 2-Year) are eligible\n\t2.Refund requests are subject to review and approval\n\t3.Refunds may be partially adjusted based on usage and service consumption\n</string>
<string name="txt_no_refund_dec">Subscriptions older than 30 days are non-refundable.</string>
<string name="txt_no_refund">No Refund After 30 Days</string>
</resources> </resources>