自动订阅的套餐列表,不显示倒计时,取消自动订阅的套餐才显示

This commit is contained in:
yezhiqiu
2026-04-16 18:17:46 +08:00
parent 1325892780
commit 3b55eaabf4
4 changed files with 31 additions and 14 deletions

View File

@@ -1 +1 @@
#Thu Apr 09 17:00:19 CST 2026
#Thu Apr 16 16:49:17 CST 2026

View File

@@ -30,7 +30,7 @@ android {
targetSdkVersion 35
versionCode 2202
// versionName "2.2.2"
versionName "2.2.2-Beta2"
versionName "2.2.2-Beta3"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

View File

@@ -1,9 +1,11 @@
package com.abbidot.tracker.ui.fragment.data
import android.animation.ValueAnimator
import android.annotation.SuppressLint
import android.content.Context
import android.view.MotionEvent
import android.view.View
import android.view.animation.LinearInterpolator
import android.widget.SeekBar
import androidx.core.view.WindowInsetsCompat
import androidx.core.view.isVisible
@@ -144,7 +146,7 @@ class RouteV3Fragment : BaseFragment<FragmentRouteV3Binding>(FragmentRouteV3Bind
llMapRouteLineV3ZoomingLayout.setOnTouchListener { _, event ->
if (rlMapRouteLineV3TimeLayout.isVisible) {
if (mLastScrollViewHeight == 0) {
if (mTotalHeight == 0) {
mTotalHeight = cvHomeRouteV3Card.height + svHomeRouteMapScroll.height
mLastScrollViewHeight = svHomeRouteMapScroll.height
}
@@ -157,7 +159,7 @@ class RouteV3Fragment : BaseFragment<FragmentRouteV3Binding>(FragmentRouteV3Bind
MotionEvent.ACTION_MOVE -> {
val dy = mLastY - event.rawY
if (abs(dy) >50){
if (abs(dy) > 50) {
val layoutParams = svHomeRouteMapScroll.layoutParams
val diff = (svHomeRouteMapScroll.height + dy).toInt()
isSlideUp = dy >= 0.0f
@@ -176,18 +178,16 @@ class RouteV3Fragment : BaseFragment<FragmentRouteV3Binding>(FragmentRouteV3Bind
MotionEvent.ACTION_UP -> {
LogUtil.e("ACTION_UP")
val layoutParams = svHomeRouteMapScroll.layoutParams
// val layoutParams = svHomeRouteMapScroll.layoutParams
if (mDiffHeight > mTotalHeight / 2) {
setSeekBarShowHide(false)
layoutParams.height = mTotalHeight
svHomeRouteMapScroll.layoutParams = layoutParams
// layoutParams.height = mTotalHeight
// svHomeRouteMapScroll.layoutParams = layoutParams
animateViewHeight(svHomeRouteMapScroll, mTotalHeight)
isListExpand = true
} else {
svHomeRouteMapScroll.postDelayed(
{ mHistoryDataMapCommon.setLatLngData(mHistoryDataList) }, 200
)
if (mDiffHeight > mLastScrollViewHeight) {
layoutParams.height = if (isSlideUp) {
val height = if (isSlideUp) {
isListExpand = true
setSeekBarShowHide(false)
mTotalHeight / 2
@@ -203,8 +203,12 @@ class RouteV3Fragment : BaseFragment<FragmentRouteV3Binding>(FragmentRouteV3Bind
}
mLastScrollViewHeight
}
animateViewHeight(svHomeRouteMapScroll, height, 300)
}
svHomeRouteMapScroll.layoutParams = layoutParams
// svHomeRouteMapScroll.layoutParams = layoutParams
svHomeRouteMapScroll.postDelayed(
{ mHistoryDataMapCommon.setLatLngData(mHistoryDataList) }, 500
)
}
}
}
@@ -231,6 +235,19 @@ class RouteV3Fragment : BaseFragment<FragmentRouteV3Binding>(FragmentRouteV3Bind
initState()
}
private fun animateViewHeight(view: View, targetHeight: Int, duration: Long = 500) {
val animator = ValueAnimator.ofInt(view.height, targetHeight)
animator.duration = duration // 设置动画持续时间
animator.interpolator = LinearInterpolator() // 设置插值器
animator.addUpdateListener { animation ->
val animatedValue = animation.animatedValue as Int
val layoutParams = view.layoutParams
layoutParams.height = animatedValue
view.layoutParams = layoutParams
}
animator.start()
}
private fun getHomeV2Activity(): HomeV2Activity? {
return if (null == activity) {
LogUtil.e("RouteV2Fragment,getHomeV2Activity,null == activity")
@@ -487,7 +504,7 @@ class RouteV3Fragment : BaseFragment<FragmentRouteV3Binding>(FragmentRouteV3Bind
*/
private fun setSeekBarShowHide(show: Boolean) {
mViewBinding.apply {
if (show && !isListExpand) {
if (show && !isListExpand && mHistoryDataList.isNotEmpty()) {
vsbMapRouteLineV3.visibility = View.VISIBLE
ivMapRouteLineV3LastBtn.visibility = View.VISIBLE
ivMapRouteLineV3NextBtn.visibility = View.VISIBLE

View File

@@ -125,7 +125,7 @@ class DeviceDFUViewModel(application: Application) : AndroidViewModel(applicatio
override fun onUpgradeFailed(
state: FirmwareUpgradeManager.State?, error: McuMgrException?
) {
LogUtil.e("DfuProgressListener -->> onError")
LogUtil.e("DfuProgressListener -->> onError${error.toString()}")
val stateBean =
DFUStateBean(context.getString(R.string.txt_upgrade_fail), mDFUFailCode)
mDfuStateLiveData.value = stateBean