diff --git a/app/build.gradle b/app/build.gradle index 2ac1d6c..36e0f28 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -28,9 +28,9 @@ android { applicationId "com.abbidot.tracker" minSdkVersion 23 targetSdkVersion 35 - versionCode 2202 - versionName "2.2.2" -// versionName "2.2.2-Beta7" + versionCode 2203 +// versionName "2.2.3" + versionName "2.2.3-Beta1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" diff --git a/app/src/main/java/com/abbidot/tracker/adapter/HelpTextImageTypeAdapter.kt b/app/src/main/java/com/abbidot/tracker/adapter/HelpTextImageTypeAdapter.kt index adef564..6a90214 100644 --- a/app/src/main/java/com/abbidot/tracker/adapter/HelpTextImageTypeAdapter.kt +++ b/app/src/main/java/com/abbidot/tracker/adapter/HelpTextImageTypeAdapter.kt @@ -1,12 +1,13 @@ package com.abbidot.tracker.adapter import android.graphics.Typeface -import android.widget.ImageView +import android.util.TypedValue import androidx.appcompat.widget.AppCompatImageView import androidx.core.content.ContextCompat import com.abbidot.baselibrary.util.AppUtils import com.abbidot.tracker.R import com.abbidot.tracker.bean.MenuTxtBean +import com.abbidot.tracker.constant.ConstantInt import com.abbidot.tracker.constant.MultipleEntity import com.abbidot.tracker.widget.TypefaceTextView import com.chad.library.adapter.base.BaseMultiItemQuickAdapter @@ -32,6 +33,8 @@ class HelpTextImageTypeAdapter(list: MutableList?) : addItemType(MultipleEntity.IMG_IMG, R.layout.layout_help_title1) //显示14sp大小的文字内容 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) { @@ -67,6 +70,23 @@ class HelpTextImageTypeAdapter(list: MutableList?) : holder.getView(R.id.tv_help_title_two).text = item.menuName holder.itemView.setPadding(0, AppUtils.dpToPx(14), 0, 0) } + + MultipleEntity.TEXT_TEXT_IMG -> { + holder.getView(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) + } } } diff --git a/app/src/main/java/com/abbidot/tracker/adapter/SubscriptionHistoryAdapter.kt b/app/src/main/java/com/abbidot/tracker/adapter/SubscriptionHistoryAdapter.kt index 1612985..84d2bde 100644 --- a/app/src/main/java/com/abbidot/tracker/adapter/SubscriptionHistoryAdapter.kt +++ b/app/src/main/java/com/abbidot/tracker/adapter/SubscriptionHistoryAdapter.kt @@ -1,5 +1,6 @@ package com.abbidot.tracker.adapter +import android.content.Context import android.content.Intent import android.view.View import android.widget.TextView @@ -16,6 +17,8 @@ import com.abbidot.tracker.ui.activity.subscribe.SubscriptionHistoryActivity import com.abbidot.tracker.widget.TypefaceRoundButton 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.roundwidget.QMUIRoundButtonDrawable /** *Created by .yzq on 2024/8/19/019. @@ -114,35 +117,39 @@ class SubscriptionHistoryAdapter( visibility = View.VISIBLE when (item.orderStatus) { 1 -> { + if (item.isAutoRenewal == 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) { +// 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天不能退款 +// //套餐超出7天不能退款 // if (nowTimestamp - updateTimestamp <= day7Timestamp) { - if (item.isRefundable == ConstantInt.Type1) { - visibility = View.VISIBLE - setText(R.string.txt_refund) - } else { - visibility = View.GONE - } - } else { +// visibility = View.VISIBLE +// setText(R.string.txt_refund) +// } else { +// visibility = View.GONE +// } +// } else { // val day30Timestamp = 30 * 24 * 60 * 60 * 1000L - //套餐超出30天不能退款 +// //套餐超出30天不能退款 // if (nowTimestamp - updateTimestamp <= day30Timestamp) { - if (item.isRefundable == ConstantInt.Type1) { - visibility = View.VISIBLE - setText(R.string.txt_refund) - } else { - visibility = View.GONE - } - } - setTextColor(ContextCompat.getColor(context, R.color.select_color)) +// 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) @@ -160,6 +167,10 @@ class SubscriptionHistoryAdapter( setChangeAlphaWhenPress(true) setOnClickListener { 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 { putExtra(ConstantString.SetMeal, item) 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)) + } + } + } \ No newline at end of file diff --git a/app/src/main/java/com/abbidot/tracker/bean/SubscriptionsOrderBean.kt b/app/src/main/java/com/abbidot/tracker/bean/SubscriptionsOrderBean.kt index 2de2c8b..63854ab 100644 --- a/app/src/main/java/com/abbidot/tracker/bean/SubscriptionsOrderBean.kt +++ b/app/src/main/java/com/abbidot/tracker/bean/SubscriptionsOrderBean.kt @@ -56,6 +56,7 @@ data class SubscriptionsOrderBean( var refundTime: Long, var planTimeMonthsCount: Int, var isRefundable: Int,//是否显示退款按钮 1:是 0:否 + var isAutoRenewal: Int,//是否是自动续订 1:是 0:否 @MultipleEntity var menuType: Int, var isUpdateOrder: Int = 0//是否是升级订单 1:是 0:否 ) : Parcelable, MultiItemEntity { @@ -103,6 +104,7 @@ data class SubscriptionsOrderBean( 0L, 0, 0, + 0, menuType, 0 ) @@ -150,6 +152,8 @@ data class SubscriptionsOrderBean( 0L, 0L, 0, + 0, + 0, MultipleEntity.TEXT, 0 ) diff --git a/app/src/main/java/com/abbidot/tracker/ui/activity/device/set/LedLightActivity.kt b/app/src/main/java/com/abbidot/tracker/ui/activity/device/set/LedLightActivity.kt index a1cd14e..3228b1c 100644 --- a/app/src/main/java/com/abbidot/tracker/ui/activity/device/set/LedLightActivity.kt +++ b/app/src/main/java/com/abbidot/tracker/ui/activity/device/set/LedLightActivity.kt @@ -279,8 +279,8 @@ class LedLightActivity : BaseActivity(ActivityLedLightB private fun setDeviceData(mapDeviceBean: MapDeviceBean) { mapDeviceBean.apply { - mLedMode=ledMode - mLedSwitch=ledSwitch + mLedMode = ledMode + mLedSwitch = ledSwitch mViewBinding.let { it.ledLightOpenAndClose.switch.isChecked = ledSwitch == ConstantInt.Open @@ -373,8 +373,10 @@ class LedLightActivity : BaseActivity(ActivityLedLightB if (ilLedLightIssueLayout.root.isGone) { YoYo.with(Techniques.BounceInUp).duration(700).onStart { ilLedLightIssueLayout.root.visibility = View.VISIBLE + vLedIssueShadeView.visibility = View.VISIBLE }.playOn(ilLedLightIssueLayout.root) } else { + vLedIssueShadeView.visibility = View.GONE YoYo.with(Techniques.SlideOutDown).duration(600).onEnd { ilLedLightIssueLayout.root.visibility = View.GONE }.playOn(ilLedLightIssueLayout.root) @@ -414,7 +416,9 @@ class LedLightActivity : BaseActivity(ActivityLedLightB if (BleManager.getInstance().isConnected(deviceMacId)) { //蓝牙控制 SRBleUtil.instance.getConnectMacDevice(deviceMacId)?.let { - SRBleUtil.instance.setBleLedSwitch(this@LedLightActivity, it.bleDevice, ledSwitch) + SRBleUtil.instance.setBleLedSwitch( + this@LedLightActivity, it.bleDevice, ledSwitch + ) } } else { //远程控制 diff --git a/app/src/main/java/com/abbidot/tracker/ui/activity/help/HelpCreatePetFenceActivity.kt b/app/src/main/java/com/abbidot/tracker/ui/activity/help/HelpCreatePetFenceActivity.kt index 1b69fae..a07ee29 100644 --- a/app/src/main/java/com/abbidot/tracker/ui/activity/help/HelpCreatePetFenceActivity.kt +++ b/app/src/main/java/com/abbidot/tracker/ui/activity/help/HelpCreatePetFenceActivity.kt @@ -11,8 +11,6 @@ import com.abbidot.tracker.util.ViewUtil class HelpCreatePetFenceActivity : BaseActivity(ActivityHelpCreatePetFenceBinding::inflate) { - private lateinit var mHelpCreateFenceAdapter: HelpTextImageTypeAdapter - override fun getTopBar() = mViewBinding.ilHelpCreatePetFenceBar.titleTopBar override fun initData() { @@ -46,9 +44,9 @@ class HelpCreatePetFenceActivity : menuList, "", imageResId = R.drawable.create_fence_help4, menuType = MultipleEntity.IMG ) - mHelpCreateFenceAdapter = HelpTextImageTypeAdapter(menuList) + val helpCreateFenceAdapter = HelpTextImageTypeAdapter(menuList) ViewUtil.instance.setRecyclerViewVerticalLinearLayout( - mContext, mViewBinding.rvHelpCreatePetFenceContent, mHelpCreateFenceAdapter + mContext, mViewBinding.rvHelpCreatePetFenceContent, helpCreateFenceAdapter ) } } \ No newline at end of file diff --git a/app/src/main/java/com/abbidot/tracker/ui/activity/help/HelpTrackerBatteryActivity.kt b/app/src/main/java/com/abbidot/tracker/ui/activity/help/HelpTrackerBatteryActivity.kt index 4c88dcb..58ab2b1 100644 --- a/app/src/main/java/com/abbidot/tracker/ui/activity/help/HelpTrackerBatteryActivity.kt +++ b/app/src/main/java/com/abbidot/tracker/ui/activity/help/HelpTrackerBatteryActivity.kt @@ -11,7 +11,6 @@ import com.abbidot.tracker.util.ViewUtil class HelpTrackerBatteryActivity : BaseActivity(ActivityHelpTrackerBatteryBinding::inflate) { - private lateinit var mHelpBatteryAdapter: HelpTextImageTypeAdapter override fun getTopBar() = mViewBinding.ilHelpTrackerBatteryBar.titleTopBar @@ -69,10 +68,7 @@ class HelpTrackerBatteryActivity : menuType = MultipleEntity.IMG_IMG ) ViewUtil.instance.addMenuBean( - menuList, - "", - imageResId = R.drawable.battery_life_help3, - menuType = MultipleEntity.IMG + menuList, "", imageResId = R.drawable.battery_life_help3, menuType = MultipleEntity.IMG ) ViewUtil.instance.addMenuBean(menuList, getString(R.string.txt_gps_update_interval)) @@ -87,10 +83,7 @@ class HelpTrackerBatteryActivity : menuType = MultipleEntity.IMG_TEXT_IMG ) ViewUtil.instance.addMenuBean( - menuList, - "", - imageResId = R.drawable.battery_life_help4, - menuType = MultipleEntity.IMG + menuList, "", imageResId = R.drawable.battery_life_help4, menuType = MultipleEntity.IMG ) ViewUtil.instance.addMenuBean(menuList, getString(R.string.txt_in_live_mode)) @@ -106,15 +99,12 @@ class HelpTrackerBatteryActivity : menuType = MultipleEntity.IMG_IMG ) ViewUtil.instance.addMenuBean( - menuList, - "", - imageResId = R.drawable.battery_life_help5, - menuType = MultipleEntity.IMG + menuList, "", imageResId = R.drawable.battery_life_help5, menuType = MultipleEntity.IMG ) - mHelpBatteryAdapter = HelpTextImageTypeAdapter(menuList) + val helpBatteryAdapter = HelpTextImageTypeAdapter(menuList) ViewUtil.instance.setRecyclerViewVerticalLinearLayout( - mContext, mViewBinding.rvHelpTrackerBatteryContent, mHelpBatteryAdapter + mContext, mViewBinding.rvHelpTrackerBatteryContent, helpBatteryAdapter ) } } \ No newline at end of file diff --git a/app/src/main/java/com/abbidot/tracker/ui/activity/subscribe/SubscriptionHistoryActivity.kt b/app/src/main/java/com/abbidot/tracker/ui/activity/subscribe/SubscriptionHistoryActivity.kt index 14dd8e7..5ebac75 100644 --- a/app/src/main/java/com/abbidot/tracker/ui/activity/subscribe/SubscriptionHistoryActivity.kt +++ b/app/src/main/java/com/abbidot/tracker/ui/activity/subscribe/SubscriptionHistoryActivity.kt @@ -1,12 +1,16 @@ package com.abbidot.tracker.ui.activity.subscribe +import android.view.View import androidx.activity.viewModels +import androidx.core.view.isGone import com.abbidot.baselibrary.constant.EventName import com.abbidot.baselibrary.eventbus.XEventBus import com.abbidot.baselibrary.util.AppUtils 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.bean.MenuTxtBean import com.abbidot.tracker.bean.SubscriptionsOrderBean import com.abbidot.tracker.constant.ConstantInt 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.util.ViewUtil import com.abbidot.tracker.vm.SubscriptionManageViewModel +import com.daimajia.androidanimations.library.Techniques +import com.daimajia.androidanimations.library.YoYo class SubscriptionHistoryActivity : BaseActivity(ActivitySubscriptionHistoryBinding::inflate) { @@ -34,15 +40,78 @@ class SubscriptionHistoryActivity : setLeftBackImage(R.drawable.icon_white_back_svg) mHistoryAdapter = SubscriptionHistoryAdapter(mSubscriptionsOrderList) + intent?.extras?.apply { + subscriptionId = getString(ConstantString.Id, "") + } mViewBinding.apply { ViewUtil.instance.setRecyclerViewVerticalLinearLayout( mContext, rvSubscriptionHistoryList, mHistoryAdapter, bottom = AppUtils.dpToPx(12) ) + setOnClickListenerViews(btnSubscriptionRefundIssue, tvCloseRefundIssueBtn) } - intent?.extras?.apply { - subscriptionId = getString(ConstantString.Id, "") - } + initIssue() + } + + private fun initIssue() { + val menuList = mutableListOf() + ViewUtil.instance.addMenuBean( + menuList, + getString(R.string.txt_refund_policy), + menuType = MultipleEntity.TEXT_TEXT_IMG, + colorRedId = R.color.data_black_color, + isSwitch = true, + state = 16 + ) + ViewUtil.instance.addMenuBean( + menuList, + getString(R.string.txt_automatic_refund), + menuType = MultipleEntity.TEXT_TEXT_IMG, + colorRedId = R.color.data_black_color, + isSwitch = true, + state = 12 + ) + ViewUtil.instance.addMenuBean( + menuList, + getString(R.string.txt_automatic_refund_dec), + menuType = MultipleEntity.TEXT_TEXT_IMG, + colorRedId = R.color.data_black_color, + state = 12 + ) + ViewUtil.instance.addMenuBean( + menuList, + getString(R.string.txt_standard_refund), + menuType = MultipleEntity.TEXT_TEXT_IMG, + colorRedId = R.color.data_black_color, + isSwitch = true, + state = 12 + ) + ViewUtil.instance.addMenuBean( + menuList, + getString(R.string.txt_standard_refund_dec), + menuType = MultipleEntity.TEXT_TEXT_IMG, + colorRedId = R.color.data_black_color, + state = 12 + ) + ViewUtil.instance.addMenuBean( + menuList, + getString(R.string.txt_no_refund), + menuType = MultipleEntity.TEXT_TEXT_IMG, + colorRedId = R.color.data_black_color, + isSwitch = true, + state = 12 + ) + ViewUtil.instance.addMenuBean( + menuList, + getString(R.string.txt_no_refund_dec), + menuType = MultipleEntity.TEXT_TEXT_IMG, + colorRedId = R.color.data_black_color, + state = 12 + ) + val helpBatteryAdapter = HelpTextImageTypeAdapter(menuList) + ViewUtil.instance.setRecyclerViewVerticalLinearLayout( + mContext, mViewBinding.rvSubscriptionRefundIssueList, helpBatteryAdapter + ) } override fun onResume() { @@ -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() + } + } + } } \ No newline at end of file diff --git a/app/src/main/java/com/abbidot/tracker/ui/fragment/data/RouteV3Fragment.kt b/app/src/main/java/com/abbidot/tracker/ui/fragment/data/RouteV3Fragment.kt index 8319740..798b14e 100644 --- a/app/src/main/java/com/abbidot/tracker/ui/fragment/data/RouteV3Fragment.kt +++ b/app/src/main/java/com/abbidot/tracker/ui/fragment/data/RouteV3Fragment.kt @@ -157,8 +157,11 @@ class RouteV3Fragment : BaseFragment(FragmentRouteV3Bind llMapRouteLineV3ZoomingLayout.setOnTouchListener { _, event -> if (rlMapRouteLineV3TimeLayout.isVisible) { + //获取初始高度 if (mTotalHeight == 0) { mTotalHeight = cvHomeRouteV3Card.height + svHomeRouteMapScroll.height + } + if (mLastScrollViewHeight == 0 && mHistoryFenceAdapter.getData().size == 1) { mCalendarLayoutHaveSeekBarHeight = rlHomeRouteCalendarV3Layout.height mLastScrollViewHeight = svHomeRouteMapScroll.height } diff --git a/app/src/main/java/com/abbidot/tracker/ui/fragment/device/HomeTrackFragment.kt b/app/src/main/java/com/abbidot/tracker/ui/fragment/device/HomeTrackFragment.kt index 2e84732..ef5ede9 100644 --- a/app/src/main/java/com/abbidot/tracker/ui/fragment/device/HomeTrackFragment.kt +++ b/app/src/main/java/com/abbidot/tracker/ui/fragment/device/HomeTrackFragment.kt @@ -653,7 +653,7 @@ class HomeTrackFragment : } //是否超时上报 - val isTimeoutReport = Util.isTimeoutReport(updateTime,gnssInterval) + val isTimeoutReport = Util.isTimeoutReport(updateTime, gnssInterval) mTrackStateList[0].let { it.menuValue = if (isTimeoutReport || lteSignal == ConstantInt.NoSignal || powerSwitch == ConstantInt.Type0 || powerSwitch == ConstantInt.Type2) { @@ -667,14 +667,14 @@ class HomeTrackFragment : mTrackStateList[1].let { it.colorRedId = R.color.blue_color1 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 getString(R.string.tracker_manage_set_led_off) - } else if (gpsSignal > ConstantInt.WeakSignal) { - getString(R.string.txt_strong_signal) - } else { - getString(R.string.txt_weak_signal) - } + } else if (gpsSignal > ConstantInt.WeakSignal) getString(R.string.txt_strong_signal) + else if (gpsSignal == ConstantInt.NoSignal) { + it.colorRedId = R.color.orange_color3 + getString(R.string.txt_no_signal) + } else getString(R.string.txt_weak_signal) } mTrackStateList[2].let { it.menuValue = @@ -1172,7 +1172,9 @@ class HomeTrackFragment : if (BleManager.getInstance().isConnected(it.deviceMacId)) { //蓝牙控制 getBleTrackDeviceBean(false)?.let { ble -> - SRBleUtil.instance.setBleLedSwitch(getHomeV2Activity()!!, ble.bleDevice, ledSwitch) + SRBleUtil.instance.setBleLedSwitch( + getHomeV2Activity()!!, ble.bleDevice, ledSwitch + ) } } else { // setLedState(ledSwitch) diff --git a/app/src/main/java/com/abbidot/tracker/util/ViewUtil.kt b/app/src/main/java/com/abbidot/tracker/util/ViewUtil.kt index 20f5730..8a31494 100644 --- a/app/src/main/java/com/abbidot/tracker/util/ViewUtil.kt +++ b/app/src/main/java/com/abbidot/tracker/util/ViewUtil.kt @@ -830,12 +830,16 @@ class ViewUtil private constructor() { colorRedId: Int = R.color.orange_color3, isSwitch: Boolean = false, type: Int = ConstantInt.Type0, + state: Int = ConstantInt.Type0, @MultipleEntity menuType: Int = MultipleEntity.TEXT ) { val menuTxtBean = MenuTxtBean(name, value, menuType) if (imageResId > 0) { menuTxtBean.imageId = imageResId } + if (state > 0) { + menuTxtBean.state = state + } if (!TextUtils.isEmpty(imageUrl)) { menuTxtBean.imageUrl = imageUrl } diff --git a/app/src/main/java/com/abbidot/tracker/vm/MapViewModel.kt b/app/src/main/java/com/abbidot/tracker/vm/MapViewModel.kt index 2355038..7103eb4 100644 --- a/app/src/main/java/com/abbidot/tracker/vm/MapViewModel.kt +++ b/app/src/main/java/com/abbidot/tracker/vm/MapViewModel.kt @@ -346,7 +346,10 @@ class MapViewModel : ViewModel() { menuType = ConstantInt.Close 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.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) value = context.getString(R.string.tracker_manage_set_gps) + ":$gpsValue" } diff --git a/app/src/main/res/layout/activity_led_light.xml b/app/src/main/res/layout/activity_led_light.xml index cb4ebf3..40d315a 100644 --- a/app/src/main/res/layout/activity_led_light.xml +++ b/app/src/main/res/layout/activity_led_light.xml @@ -23,9 +23,9 @@ android:paddingHorizontal="@dimen/dp_14" android:paddingVertical="@dimen/dp_6" android:text="@string/acccount_btn_save" - android:visibility="gone" android:textColor="@color/btn_color" android:textSize="@dimen/textSize12" + android:visibility="gone" app:qmui_radius="@dimen/dp_100" app:typeface="@string/roboto_bold_font" /> @@ -111,9 +111,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentEnd="true" - android:visibility="gone" android:layout_centerVertical="true" - android:layout_marginEnd="@dimen/dp_36" /> + android:layout_marginEnd="@dimen/dp_36" + android:visibility="gone" /> @@ -179,6 +179,13 @@ + + - + + - \ No newline at end of file + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/layout_live_issue.xml b/app/src/main/res/layout/layout_live_issue.xml index d517efd..581bfb0 100644 --- a/app/src/main/res/layout/layout_live_issue.xml +++ b/app/src/main/res/layout/layout_live_issue.xml @@ -64,7 +64,7 @@ style="@style/my_TextView_style_v2" android:layout_gravity="center" 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:padding="@dimen/dp_16" android:text="@string/txt_close" diff --git a/app/src/main/res/layout/layout_pet_location_info.xml b/app/src/main/res/layout/layout_pet_location_info.xml index 53f3aaf..41295a2 100644 --- a/app/src/main/res/layout/layout_pet_location_info.xml +++ b/app/src/main/res/layout/layout_pet_location_info.xml @@ -14,6 +14,7 @@ android:layout_marginTop="@dimen/dp_10" android:layout_marginEnd="@dimen/dp_42" android:drawablePadding="@dimen/dp_2" + android:gravity="start" android:textSize="@dimen/textSize16" app:typeface="@string/roboto_regular_font" /> @@ -24,6 +25,7 @@ android:layout_below="@id/tv_pet_location_reverse_geocode" android:layout_marginTop="@dimen/dp_2" android:layout_marginBottom="@dimen/dp_12" + android:gravity="start" android:textColor="@color/select_color3" android:textSize="@dimen/textSize12" app:typeface="@string/roboto_regular_font" /> diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 15c0f15..0ca9b61 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -950,7 +950,7 @@ Verlängerung: $%s/%s Tag am %s /Tag x%s Die ABBIDOT-App sammelt Standortdaten. Die Route und Entfernung zwischen dem aktuellen Standort und dem Gerät können berechnet werden. - (Verlängerung für $%s pro %s Tag danach) + (Verlängerung für $%s pro Tag danach) (Verlängerung für $%s/%s Tage danach) (Verlängerung für $%s/%s Jahre danach) (Verlängerung für $%s/%s Monate danach) diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index e5491d9..1b4f24f 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -994,7 +994,7 @@ 续费:$%s/%s天,于%s /天 x%s ABBIDOT应用收集位置数据,可计算当前位置与设备之间的路线和距离。 - (之后按$%s每%s天续费) + (之后按$%s每天续费) (之后按$%s/%s天续费) (之后按$%s/%s年续费) (之后按$%s/%s月续费) diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 390a3b3..8d011d5 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -8,6 +8,7 @@ #00000000 + #80000000 #FFFFFFFF diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 68a8c87..d58ba44 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1051,7 +1051,7 @@ Renewal: $%s/%s day on %s /day x%s ABBIDOT APP collects location data,The route and distance between the current location and the device can be calculated. - (Renew at $%s per %s day thereafter) + (Renew at $%s per day thereafter) (Renew at $%s/%s days thereafter) (Renew at $%s/%s years thereafter) (Renew at $%s/%s months thereafter) @@ -1082,5 +1082,13 @@ Renewal: $%s/%s years on %s Renewal: $%s/%s months on %s Baidu Map + Refund period has expired + Refund Policy\n + Automatic Refund (Within 48 Hours) + All subscription purchases are eligible for a full automatic refund within 48 hours of payment. Refunds will be processed automatically without manual review.\n + Standard Refund Window (30 Days) + 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 + Subscriptions older than 30 days are non-refundable. + No Refund After 30 Days \ No newline at end of file