[6.2.6]change the mogo p

This commit is contained in:
zhongchao
2023-12-18 17:34:47 +08:00
parent 4c5b88aecf
commit fdb4133160
11 changed files with 75 additions and 46 deletions

View File

@@ -42,6 +42,7 @@ class PncActionsView @JvmOverloads constructor(
private val bgResources: Int
private val txtSize: Float
private val txtStyle: Int
init {
LayoutInflater.from(context).inflate(R.layout.view_pnc_actions, this, true)
@@ -54,13 +55,17 @@ class PncActionsView @JvmOverloads constructor(
R.styleable.PncActionsView_pnc_size,
resources.getDimension(R.dimen.dp_34)
)
txtStyle = a.getResourceId(R.styleable.PncActionsView_pnc_txt_style,0)
tvHmiPncActions.setTextAppearance(txtStyle)
a.recycle()
}
override fun onAttachedToWindow() {
super.onAttachedToWindow()
tvHmiPncActions.setTextSize(COMPLEX_UNIT_PX, txtSize)
tvHmiPncActions.background =
AppCompatResources.getDrawable(context, bgResources)
tvHmiPncActions.text = "前方右转"
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
CallerPlanningActionsListenerManager.addListener(TAG, this)
CallerTrafficLightListenerManager.addListener(TAG, this)
@@ -74,12 +79,12 @@ class PncActionsView @JvmOverloads constructor(
}
override fun onAutopilotStatusResponse(state: Int) {
if (state != STATUS_AUTOPILOT_RUNNING) {
UiThreadHandler.post {
tvHmiPncActions.background = null
tvHmiPncActions.text = ""
}
}
// if (state != STATUS_AUTOPILOT_RUNNING) {
// UiThreadHandler.post {
// tvHmiPncActions.background = null
// tvHmiPncActions.text = ""
// }
// }
}
@BizConfig(FOUNDATION, "", BIZ_PNC_ACTIONS)

View File

@@ -86,8 +86,14 @@
<declare-styleable name="PncActionsView">
<attr name="background_resource" format="reference"/>
<attr name="pnc_size" format="dimension"/>
<attr name="pnc_txt_style" format="reference"/>
</declare-styleable>
<style name="AudioFileInfoOverlayText">
<item name="android:shadowColor">#80000000</item>
<item name="android:shadowRadius">11</item>
</style>
<declare-styleable name="DriverMsgBoxButtonView">
<attr name="bgDrawable" format="reference"/>
</declare-styleable>

View File

@@ -72,6 +72,13 @@ object TrackerSourceFilterHelper {
}
}
// pnc预警
WarningHelper.getPncColor(data.uuid.toString()) {
if (it.isNotBlank()) {
color = it
}
}
//僵尸车
if (data.addAttribute == AdditionalAttribute.ATTR_ZOMBIE) {
color = "#7A8499FF"
@@ -82,12 +89,6 @@ object TrackerSourceFilterHelper {
CallerFuncBizListenerManager.invokeAttrZombieAnalyticsEvent()
}
// pnc预警
WarningHelper.getPncColor(data.uuid.toString()) {
if (it.isNotBlank()) {
color = it
}
}
return color
}