[3.2.0] remove fog of v2x

This commit is contained in:
zhongchao
2023-06-05 12:05:00 +08:00
parent 391a5568e8
commit 5ace8fdd0f
19 changed files with 4 additions and 245 deletions

View File

@@ -26,11 +26,6 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<!--浓雾预警动画-->
<com.mogo.eagle.core.function.hmi.ui.widget.V2XFogEventView
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<com.mogo.eagle.core.function.hmi.ui.widget.RomaPassengerView
android:id="@+id/ivMoGoLogo"
android:layout_width="@dimen/dp_120"

View File

@@ -36,11 +36,6 @@
</FrameLayout>
<!--浓雾预警动画-->
<com.mogo.eagle.core.function.hmi.ui.widget.V2XFogEventView
android:layout_width="match_parent"
android:layout_height="match_parent" />
<!--V2X预警红色边框-->
<com.mogo.eagle.core.function.hmi.ui.widget.V2XWarningView
android:layout_width="match_parent"

View File

@@ -39,11 +39,6 @@
android:layout_width="@dimen/dp_148"
android:layout_height="@dimen/dp_150"/>
<!--浓雾预警动画-->
<com.mogo.eagle.core.function.hmi.ui.widget.V2XFogEventView
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<!--V2X预警红色边框-->
<com.mogo.eagle.core.function.hmi.ui.widget.V2XWarningView
android:layout_width="match_parent"

View File

@@ -44,11 +44,6 @@
</FrameLayout>
<!--浓雾预警动画-->
<com.mogo.eagle.core.function.hmi.ui.widget.V2XFogEventView
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<!--V2X预警红色边框-->
<com.mogo.eagle.core.function.hmi.ui.widget.V2XWarningView
android:layout_width="match_parent"

View File

@@ -27,11 +27,6 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<!--浓雾预警动画-->
<com.mogo.eagle.core.function.hmi.ui.widget.V2XFogEventView
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<com.mogo.eagle.core.function.hmi.ui.widget.RomaPassengerView
android:id="@+id/ivMoGoLogo"
android:layout_width="@dimen/dp_121"

View File

@@ -36,11 +36,6 @@
</FrameLayout>
<!--浓雾预警动画-->
<com.mogo.eagle.core.function.hmi.ui.widget.V2XFogEventView
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<!--V2X预警红色边框-->
<com.mogo.eagle.core.function.hmi.ui.widget.V2XWarningView
android:layout_width="match_parent"

View File

@@ -40,11 +40,6 @@
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<!--浓雾预警动画-->
<com.mogo.eagle.core.function.hmi.ui.widget.V2XFogEventView
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<!--pnc行为决策-->
<com.mogo.eagle.core.function.hmi.ui.vehicle.PncActionsView
android:layout_width="wrap_content"

View File

@@ -91,11 +91,6 @@
</RelativeLayout>
<!--浓雾预警动画-->
<com.mogo.eagle.core.function.hmi.ui.widget.V2XFogEventView
android:layout_width="match_parent"
android:layout_height="match_parent" />
<!--V2X预警红色边框-->
<com.mogo.eagle.core.function.hmi.ui.widget.V2XWarningView
android:layout_width="match_parent"

View File

@@ -49,7 +49,7 @@ class V2XMarkerRoadEventView(context: Context, alarmInfo: V2XRoadEventEntity) :
* @see EventTypeEnumNew
*/
private fun updateIcon(alarmInfo: V2XRoadEventEntity) {
// 道路施工、积水、路面结冰、浓雾、事故、拥堵
// 道路施工、积水、路面结冰、事故、拥堵
val iconResId = EventTypeEnumNew.getUpdateIconRes(alarmInfo.poiType)
if (iconResId != 0) {
ivCar.setImageResource(iconResId)

View File

@@ -1,95 +0,0 @@
package com.mogo.eagle.core.function.hmi.ui.widget
import android.animation.Animator
import android.animation.Animator.AnimatorListener
import android.animation.AnimatorSet
import android.animation.ObjectAnimator
import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import android.view.View
import androidx.constraintlayout.widget.ConstraintLayout
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
import com.mogo.eagle.core.data.enums.WarningDirectionEnum
import com.mogo.eagle.core.function.api.hmi.warning.IV2XEventListener
import com.mogo.eagle.core.function.call.v2x.CallerV2XWarningListenerManager
import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.utilcode.util.ThreadUtils
import kotlinx.android.synthetic.main.view_v2x_warning_fog.view.*
class V2XFogEventView(context: Context, attrs: AttributeSet) :
ConstraintLayout(context, attrs), IV2XEventListener {
companion object {
private const val TAG = "V2XFogEventView"
}
private val animatorSet = AnimatorSet()
init {
LayoutInflater.from(context).inflate(R.layout.view_v2x_warning_fog, this, true)
val animator1 = ObjectAnimator.ofFloat(iv_wu1, "alpha", 0f, 1f, 0f)
val animator2 = ObjectAnimator.ofFloat(iv_wu1, "translationX", -500f, 100f, 300f)
val animator3 = ObjectAnimator.ofFloat(iv_wu1, "scaleX", 1f, 1.5f, 2f)
val animator4 = ObjectAnimator.ofFloat(iv_wu1, "scaleY", 1f, 1.5f, 2f)
val animator5 = ObjectAnimator.ofFloat(iv_wu2, "alpha", 0f, 1f, 0f)
val animator6 = ObjectAnimator.ofFloat(iv_wu2, "translationX", 500f, -100f, -300f)
val animator7 = ObjectAnimator.ofFloat(iv_wu2, "scaleX", 1f, 1.5f, 2f)
val animator8 = ObjectAnimator.ofFloat(iv_wu2, "scaleY", 1f, 1.5f, 2f)
animatorSet.playTogether(
animator1,
animator2,
animator3,
animator4,
animator5,
animator6,
animator7,
animator8
)
animatorSet.duration = 5000
animatorSet.addListener(object : AnimatorListener{
override fun onAnimationStart(animation: Animator?) {
visibility = View.VISIBLE
}
override fun onAnimationEnd(animation: Animator?) {
visibility = View.GONE
}
override fun onAnimationCancel(animation: Animator?) {
visibility = View.GONE
}
override fun onAnimationRepeat(animation: Animator?) {
}
})
}
override fun onAttachedToWindow() {
super.onAttachedToWindow()
CallerV2XWarningListenerManager.addListener(TAG, this)
}
override fun show(v2xType: String, direction: WarningDirectionEnum, time: Long) {
ThreadUtils.runOnUiThread {
if(v2xType == EventTypeEnumNew.FOURS_FOG.poiType){
if (animatorSet.isStarted) {
return@runOnUiThread
}
animatorSet.start()
}
}
}
override fun dismiss(direction: WarningDirectionEnum) {
}
override fun onDetachedFromWindow() {
super.onDetachedFromWindow()
CallerV2XWarningListenerManager.removeListener(TAG)
}
}

View File

@@ -1,55 +0,0 @@
package com.mogo.eagle.core.function.main;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.content.res.Resources;
import android.util.DisplayMetrics;
import android.view.View;
import com.mogo.eagle.core.function.hmi.R;
/**
* created by wujifei on 2021/3/30 14:05
* describe:
*/
public class DisplayEffectsHelper {
private volatile static DisplayEffectsHelper instance = null;
private AnimatorSet animatorSet;
public static DisplayEffectsHelper getInstance() {
if (instance == null) {
synchronized (DisplayEffectsHelper.class) {
if (instance == null) {
instance = new DisplayEffectsHelper();
}
}
}
return instance;
}
public void init(View rootView) {
View view1 = rootView.findViewById(R.id.iv_wu1);
View view2 = rootView.findViewById(R.id.iv_wu2);
ObjectAnimator animator1 = ObjectAnimator.ofFloat(view1, "alpha", 0f, 1f, 0f);
ObjectAnimator animator2 = ObjectAnimator.ofFloat(view1, "translationX", -500, 100f, 300f);
ObjectAnimator animator3 = ObjectAnimator.ofFloat(view1, "scaleX", 1f, 1.5f, 2f);
ObjectAnimator animator4 = ObjectAnimator.ofFloat(view1, "scaleY", 1f, 1.5f, 2f);
ObjectAnimator animator5 = ObjectAnimator.ofFloat(view2, "alpha", 0f, 1f, 0f);
ObjectAnimator animator6 = ObjectAnimator.ofFloat(view2, "translationX", 500, -100f, -300f);
ObjectAnimator animator7 = ObjectAnimator.ofFloat(view2, "scaleX", 1f, 1.5f, 2f);
ObjectAnimator animator8 = ObjectAnimator.ofFloat(view2, "scaleY", 1f, 1.5f, 2f);
animatorSet = new AnimatorSet();
animatorSet.playTogether(animator1, animator2, animator3, animator4, animator5, animator6, animator7, animator8);
animatorSet.setDuration(5000);
}
public void display() {
animatorSet.start();
}
private float dp2px(float dp) {
DisplayMetrics metrics = Resources.getSystem().getDisplayMetrics();
return dp * metrics.density;
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 784 KiB

View File

@@ -1,28 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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:visibility="gone">
<ImageView
android:id="@+id/iv_wu1"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:alpha="0"
android:src="@drawable/wu1"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:ignore="ContentDescription" />
<ImageView
android:id="@+id/iv_wu2"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:alpha="0"
android:src="@drawable/wu2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintRight_toRightOf="parent"
tools:ignore="ContentDescription" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -50,8 +50,6 @@ public class CloudPoiManager {
R.drawable.module_common_icon_map_marker_road_block_up2, R.drawable.module_common_icon_map_marker_road_block_up2_white, "拥堵"));
poiWrapper.put(EventTypeEnumNew.FOURS_PONDING.getPoiType(), new PoiWrapper(EventTypeEnumNew.FOURS_PONDING.getPoiType(),
R.drawable.module_common_icon_map_marker_pondingl2, R.drawable.module_common_icon_map_marker_pondingl2_white, "积水"));
poiWrapper.put(EventTypeEnumNew.FOURS_FOG.getPoiType(), new PoiWrapper(EventTypeEnumNew.FOURS_FOG.getPoiType(),
R.drawable.module_common_ic_rc_dark_frog2, R.drawable.module_common_ic_rc_dark_frog2_white, "浓雾"));
poiWrapper.put(EventTypeEnumNew.FOURS_ICE.getPoiType(), new PoiWrapper(EventTypeEnumNew.FOURS_ICE.getPoiType(),
R.drawable.module_common_ic_rc_freeze2, R.drawable.module_common_ic_rc_freeze2_white, "结冰"));
poiWrapper.put(EventTypeEnumNew.FOURS_ACCIDENT.getPoiType(), new PoiWrapper(EventTypeEnumNew.FOURS_ACCIDENT.getPoiType(),

View File

@@ -45,12 +45,6 @@ enum class EventTypeEnumNew(
"前方道路积水", "道路积水"
),
//浓雾
FOURS_FOG(
"10010", "出现浓雾", "浓雾预警", R.drawable.v2x_icon_nongwu_vr,
"前方出现浓雾", "出现浓雾"
),
//结冰
FOURS_ICE(
"10011", "路面结冰", "路面结冰", R.drawable.v2x_icon_jiebing_vr,
@@ -538,7 +532,6 @@ enum class EventTypeEnumNew(
FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.poiTypeStr
FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.poiTypeStr
FOURS_PONDING.poiType -> FOURS_PONDING.poiTypeStr
FOURS_FOG.poiType -> FOURS_FOG.poiTypeStr
FOURS_ICE.poiType -> FOURS_ICE.poiTypeStr
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType,
@@ -559,7 +552,6 @@ enum class EventTypeEnumNew(
FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.poiTypeStrVr
FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.poiTypeStrVr
FOURS_PONDING.poiType -> FOURS_PONDING.poiTypeStrVr
FOURS_FOG.poiType -> FOURS_FOG.poiTypeStrVr
FOURS_ICE.poiType -> FOURS_ICE.poiTypeStrVr
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType,
@@ -580,7 +572,6 @@ enum class EventTypeEnumNew(
FOURS_ROAD_WORK.poiType -> "施工"
FOURS_BLOCK_UP.poiType -> "道路拥堵"
FOURS_PONDING.poiType -> "道路积水"
FOURS_FOG.poiType -> "出现浓雾"
FOURS_ICE.poiType -> "路面结冰"
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> "交通事故"
@@ -596,7 +587,6 @@ enum class EventTypeEnumNew(
FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.poiTypeSrcVr
FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.poiTypeSrcVr
FOURS_PONDING.poiType -> FOURS_PONDING.poiTypeSrcVr
FOURS_FOG.poiType -> FOURS_FOG.poiTypeSrcVr
FOURS_ICE.poiType -> FOURS_ICE.poiTypeSrcVr
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType,
@@ -616,7 +606,7 @@ enum class EventTypeEnumNew(
return when (poiType) {
FOURS_BLOCK_UP.poiType, FOURS_LIVING.poiType-> if (isVrMode) R.drawable.bg_v2x_event_type_orange_vr else R.drawable.bg_v2x_event_type_orange
TRAFFIC_CHECK.poiType, ROAD_CLOSED.poiType, FOURS_ROAD_WORK.poiType,
FOURS_PONDING.poiType, FOURS_FOG.poiType, FOURS_ICE.poiType, FOURS_ACCIDENT.poiType,
FOURS_PONDING.poiType, FOURS_ICE.poiType, FOURS_ACCIDENT.poiType,
FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType, FOURS_ACCIDENT_03.poiType,
FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> if (isVrMode) R.drawable.bg_v2x_event_type_red_vr else R.drawable.bg_v2x_event_type_read
else -> {
@@ -632,7 +622,7 @@ enum class EventTypeEnumNew(
R.drawable.bg_v2x_event_type_orange
TRAFFIC_CHECK.poiType, ROAD_CLOSED.poiType,
FOURS_ROAD_WORK.poiType, FOURS_PONDING.poiType,
FOURS_FOG.poiType, FOURS_ICE.poiType,
FOURS_ICE.poiType,
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType,
FOURS_ACCIDENT_02.poiType, FOURS_ACCIDENT_03.poiType,
FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType ->
@@ -649,7 +639,7 @@ enum class EventTypeEnumNew(
return when (poiType) {
TRAFFIC_CHECK.poiType, ROAD_CLOSED.poiType,
FOURS_ROAD_WORK.poiType, FOURS_BLOCK_UP.poiType,
FOURS_PONDING.poiType, FOURS_FOG.poiType,
FOURS_PONDING.poiType,
FOURS_ICE.poiType, FOURS_ACCIDENT.poiType,
FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType,
@@ -670,7 +660,6 @@ enum class EventTypeEnumNew(
FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.tts
FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.tts
FOURS_PONDING.poiType -> FOURS_PONDING.tts
FOURS_FOG.poiType -> FOURS_FOG.tts
FOURS_ICE.poiType -> FOURS_ICE.tts
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType -> FOURS_ACCIDENT.tts
@@ -690,7 +679,6 @@ enum class EventTypeEnumNew(
FOURS_ROAD_WORK.poiType -> FOURS_ROAD_WORK.content
FOURS_BLOCK_UP.poiType -> FOURS_BLOCK_UP.content
FOURS_PONDING.poiType -> FOURS_PONDING.content
FOURS_FOG.poiType -> FOURS_FOG.content
FOURS_ICE.poiType -> FOURS_ICE.content
FOURS_ACCIDENT.poiType, FOURS_ACCIDENT_01.poiType, FOURS_ACCIDENT_02.poiType,
FOURS_ACCIDENT_03.poiType, FOURS_ACCIDENT_04.poiType, FOURS_ACCIDENT_05.poiType ->
@@ -710,7 +698,6 @@ enum class EventTypeEnumNew(
FOURS_BLOCK_UP.poiType -> R.raw.v2x_yongdu
FOURS_ACCIDENT.poiType,FOURS_ACCIDENT_04.poiType -> R.raw.v2x_shigu
FOURS_LIVING.poiType -> R.raw.v2x_shishilukuang
FOURS_FOG.poiType -> R.raw.v2x_nongwu
TRAFFIC_CHECK.poiType -> R.raw.v2x_jiaotongjiancha
FOURS_ROAD_WORK.poiType -> R.raw.v2x_daolushigong
FOURS_ICE.poiType -> R.raw.v2x_daolujiebing
@@ -763,10 +750,6 @@ enum class EventTypeEnumNew(
FOURS_PONDING.poiType ->{
FOURS_PONDING.poiTypeStr
}
//浓雾
FOURS_FOG.poiType ->{
FOURS_FOG.poiTypeStr
}
//结冰
FOURS_ICE.poiType ->{
FOURS_ICE.poiTypeStr
@@ -1066,10 +1049,6 @@ enum class EventTypeEnumNew(
FOURS_PONDING.poiType -> {
R.drawable.v2x_icon_jishui_vr
}
//浓雾
FOURS_FOG.poiType -> {
R.drawable.v2x_icon_nongwu_vr
}
//结冰
FOURS_ICE.poiType -> {
R.drawable.v2x_icon_jiebing_vr

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB