Merge branch 'release_sweeper-d_231206_6.2.4.2' into 'master'
【Publish】Sweeper V6.2.4 See merge request SCA/L4HA/AndroidApp/MoGoEagleEye!848
This commit is contained in:
@@ -57,14 +57,14 @@ public class SweeperProvider implements IMogoOCH, IMoGoSweeperModeListener {
|
||||
FragmentManager supportFragmentManager = activity.getSupportFragmentManager();
|
||||
if (sweeperOperateFragment == null) {
|
||||
CallerLogger.d(TAG, "准备add fragment======");
|
||||
Fragment fragmentByTag = supportFragmentManager.findFragmentByTag(sweeperOperateFragment.TAG);
|
||||
Fragment fragmentByTag = supportFragmentManager.findFragmentByTag(SweeperOperateFragment.TAG);
|
||||
if (fragmentByTag instanceof SweeperOperateFragment) {
|
||||
sweeperOperateFragment = (SweeperOperateFragment) fragmentByTag;
|
||||
} else {
|
||||
sweeperOperateFragment = new SweeperOperateFragment();
|
||||
}
|
||||
if (!sweeperOperateFragment.isAdded()) {
|
||||
supportFragmentManager.beginTransaction().add(containerId, sweeperOperateFragment, sweeperOperateFragment.TAG).commitAllowingStateLoss();
|
||||
supportFragmentManager.beginTransaction().add(containerId, sweeperOperateFragment, SweeperOperateFragment.TAG).commitAllowingStateLoss();
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -76,14 +76,14 @@ public class SweeperProvider implements IMogoOCH, IMoGoSweeperModeListener {
|
||||
FragmentManager supportFragmentManager = activity.getSupportFragmentManager();
|
||||
if (sweeperCloudFragment == null) {
|
||||
CallerLogger.d(TAG, "准备add fragment======");
|
||||
Fragment fragmentByTag = supportFragmentManager.findFragmentByTag(sweeperCloudFragment.TAG);
|
||||
Fragment fragmentByTag = supportFragmentManager.findFragmentByTag(SweeperCloudFragment.TAG);
|
||||
if (fragmentByTag instanceof SweeperCloudFragment) {
|
||||
sweeperCloudFragment = (SweeperCloudFragment) fragmentByTag;
|
||||
} else {
|
||||
sweeperCloudFragment = new SweeperCloudFragment();
|
||||
}
|
||||
if (!sweeperCloudFragment.isAdded()) {
|
||||
supportFragmentManager.beginTransaction().add(containerId, sweeperCloudFragment, sweeperCloudFragment.TAG).commitAllowingStateLoss();
|
||||
supportFragmentManager.beginTransaction().add(containerId, sweeperCloudFragment, SweeperCloudFragment.TAG).commitAllowingStateLoss();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -458,7 +458,7 @@ public class SweeperCloudTaskModel implements IMoGoSweeperFutianCloudTaskListene
|
||||
public void onSweeperFutianCloudTaskCloudSuspendResume(@NonNull AiCloudTask.MessageType messageType, @Nullable String reqNo, long sysTime,
|
||||
@Nullable SweeperTaskCloudSuspendResume.BigTaskActionPush bigTaskActionPush) {
|
||||
CallerLogger.d(M_SWEEPER + TAG, "messageType: " + messageType.getNumber() + " sysTime:" + sysTime + " reqNo:" + reqNo + " " +
|
||||
"onSweeperFutianCloudTaskCloudSuspendResume:" + SweeperCloudTaskUtils.printMessage(bigTaskActionPush));
|
||||
"onSweeperFutianCloudTaskCloudSuspendResume:" + bigTaskActionPush == null ? "null" : SweeperCloudTaskUtils.printMessage(bigTaskActionPush));
|
||||
DebugView.Companion.printInfoMsg("[云控]云端下发暂停/恢复指令,messageType=" + messageType.getNumber()
|
||||
+ ", sysTime=" + sysTime
|
||||
+ ", reqNo=" + reqNo
|
||||
|
||||
@@ -54,22 +54,26 @@ class TurnSignalView : LinearLayout {
|
||||
//根据左右进行显示和隐藏,实际要判断每个来的时间和频度
|
||||
when (directionLight) {
|
||||
Chassis.LightSwitch.LIGHT_LEFT -> { //左转向
|
||||
leftSelectImage.visibility = View.VISIBLE
|
||||
rightSelectImage.visibility = View.GONE
|
||||
rightSelectImage.clearAnimation()
|
||||
setAnimation(leftSelectImage)
|
||||
leftSelectImage?.visibility = View.VISIBLE
|
||||
rightSelectImage?.visibility = View.GONE
|
||||
rightSelectImage?.clearAnimation()
|
||||
leftSelectImage?.also {
|
||||
setAnimation(it)
|
||||
}
|
||||
}
|
||||
Chassis.LightSwitch.LIGHT_RIGHT -> { //右转向
|
||||
leftSelectImage.visibility = View.GONE
|
||||
rightSelectImage.visibility = View.VISIBLE
|
||||
leftSelectImage.clearAnimation()
|
||||
setAnimation(rightSelectImage)
|
||||
leftSelectImage?.visibility = View.GONE
|
||||
rightSelectImage?.visibility = View.VISIBLE
|
||||
leftSelectImage?.clearAnimation()
|
||||
rightSelectImage?.also {
|
||||
setAnimation(it)
|
||||
}
|
||||
}
|
||||
else -> { //消失
|
||||
leftSelectImage.clearAnimation()
|
||||
rightSelectImage.clearAnimation()
|
||||
leftSelectImage.visibility = View.GONE
|
||||
rightSelectImage.visibility = View.GONE
|
||||
leftSelectImage?.clearAnimation()
|
||||
rightSelectImage?.clearAnimation()
|
||||
leftSelectImage?.visibility = View.GONE
|
||||
rightSelectImage?.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -77,14 +81,18 @@ class TurnSignalView : LinearLayout {
|
||||
|
||||
//实现图片闪烁效果
|
||||
private fun setAnimation(imageView: ImageView) {
|
||||
val animationSet = AnimatorSet()
|
||||
val valueAnimator = ObjectAnimator.ofFloat(imageView, "alpha", 0f, 1.0f)
|
||||
val valueAnimatorDisappare = ObjectAnimator.ofFloat(imageView, "alpha", 1.0f, 0f)
|
||||
valueAnimator.duration = 1000
|
||||
valueAnimatorDisappare.duration = 800
|
||||
valueAnimator.repeatCount = -1
|
||||
valueAnimatorDisappare.repeatCount = -1
|
||||
animationSet.playTogether(valueAnimatorDisappare, valueAnimator)
|
||||
animationSet.start()
|
||||
try {
|
||||
val animationSet = AnimatorSet()
|
||||
val valueAnimator = ObjectAnimator.ofFloat(imageView, "alpha", 0f, 1.0f)
|
||||
val valueAnimatorDisappare = ObjectAnimator.ofFloat(imageView, "alpha", 1.0f, 0f)
|
||||
valueAnimator.duration = 1000
|
||||
valueAnimatorDisappare.duration = 800
|
||||
valueAnimator.repeatCount = -1
|
||||
valueAnimatorDisappare.repeatCount = -1
|
||||
animationSet.playTogether(valueAnimatorDisappare, valueAnimator)
|
||||
animationSet.start()
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user