[2.15.0] roma change and track color change

This commit is contained in:
zhongchao
2023-04-13 15:21:22 +08:00
parent b28e8b213b
commit deac094158
11 changed files with 55 additions and 10 deletions

View File

@@ -1,6 +1,7 @@
package com.mogo.eagle.core.function.hmi.ui.widget
import android.content.Context
import android.content.res.TypedArray
import android.util.AttributeSet
import android.view.LayoutInflater
import androidx.constraintlayout.widget.ConstraintLayout
@@ -23,8 +24,15 @@ class RomaPassengerView @JvmOverloads constructor(
@Volatile
private var romaMode = false
private val openRes: Int
private val normalRes: Int
init {
LayoutInflater.from(context).inflate(R.layout.view_roma_passenger_bg, this, true)
val a = context.obtainStyledAttributes(attrs, R.styleable.RomaPassengerView, defStyleAttr, 0)
openRes = a.getResourceId(R.styleable.RomaPassengerView_roma_open,0)
normalRes = a.getResourceId(R.styleable.RomaPassengerView_roma_close,0)
a.recycle()
setOnClickListener {
romaMode = !romaMode
romaTrigger(romaMode)
@@ -42,9 +50,15 @@ class RomaPassengerView @JvmOverloads constructor(
when (String(byteArray)) {
"0" -> {
romaMode = true
if(openRes != 0){
setBackgroundResource(openRes)
}
}
"1" -> {
romaMode = false
if(normalRes != 0){
setBackgroundResource(normalRes)
}
}
}
}

View File

@@ -80,4 +80,8 @@
<attr name="pnc_size" format="reference"/>
</declare-styleable>
<declare-styleable name="RomaPassengerView">
<attr name="roma_open" format="reference"/>
<attr name="roma_close" format="reference"/>
</declare-styleable>
</resources>

View File

@@ -65,10 +65,10 @@ object TrackerSourceFilterHelper {
//僵尸车
if(data.addAttribute == AdditionalAttribute.ATTR_ZOMBIE){
color = "#AD7488FF"
color = "#7A8499FF"
CallerMapUIServiceManager.getMapUIController()?.let {
if(it.isDayMode){
color = "#AE7887FF"
color = "#9BA8BCFF"
}
}
}

View File

@@ -46,7 +46,7 @@ object WarningHelper {
mMarkersCaches[trackId] ?: return@Consumer
if (planningObj.type == 0) { //0是leading障碍物障碍物车身红色提示
pncWarningBeautyTrafficData[trackId] = PlanningTrack(
"#FF0000FF",
"#D65D5AFF",
getCurWgs84SatelliteTime()
)
} else if (planningObj.type == 1) { //1是避障和择机的障碍物障碍物车身黄色提示