diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/bone/status/fsm/FSMStatusDetailView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/bone/status/fsm/FSMStatusDetailView.kt index 47115ebe99..dcf5bd1f5e 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/bone/status/fsm/FSMStatusDetailView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/bone/status/fsm/FSMStatusDetailView.kt @@ -60,7 +60,7 @@ class FSMStatusDetailView @JvmOverloads constructor( val c = Color.parseColor("#FF4E41") tvTitle?.setTextColor(c) } - addFsmMsgItemView(msgArray) + addFsmMsgItemView(msgArray, true) //监听最新 FSM 状态 StatusManager.addListener(TAG, this) @@ -69,16 +69,16 @@ class FSMStatusDetailView @JvmOverloads constructor( private fun setFsmNormalStatus() { tvTitle?.text = "FSM正常" runCatching { - val c = Color.parseColor("#2EACFF") + val c = Color.parseColor("#26C14F") tvTitle?.setTextColor(c) } - removeFsmMsgItemView() + addFsmMsgItemView(ArrayList().also { it += "FSM异常状态已恢复" }, false) } private fun setFsmUnknownStatus() { tvTitle?.text = "FSM状态未知" runCatching { - val c = Color.parseColor("#FFFFFF") + val c = Color.parseColor("#FFCD3D") tvTitle?.setTextColor(c) } removeFsmMsgItemView() @@ -93,7 +93,7 @@ class FSMStatusDetailView @JvmOverloads constructor( removeFsmMsgItemView() } - private fun addFsmMsgItemView(msgArray: ArrayList) { + private fun addFsmMsgItemView(msgArray: ArrayList, isError: Boolean) { if (llFsmMsgContainerLayout == null) { Logger.e(TAG, "addFsmMsmItemView llFsmMsgContainerLayout is null") return @@ -104,6 +104,7 @@ class FSMStatusDetailView @JvmOverloads constructor( val itemView: View = LayoutInflater.from(context) .inflate(R.layout.view_status_fsm_item_layout, llFsmMsgContainerLayout, false) val leftImageView: ImageView = itemView.findViewById(R.id.leftImageView) + leftImageView.setImageResource(if (isError) R.drawable.icon_fsm_error_red_arrow else R.drawable.icon_fsm_error_green_arrow) val rightTextView: TextView = itemView.findViewById(R.id.rightTextView) rightTextView.text = it llFsmMsgContainerLayout?.addView(itemView) diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_fsm_error_green_arrow.png b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_fsm_error_green_arrow.png new file mode 100644 index 0000000000..2247e49b85 Binary files /dev/null and b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_fsm_error_green_arrow.png differ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_fsm_error_red_arrow.png b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_fsm_error_red_arrow.png index e30e3b9265..fba55f99d1 100644 Binary files a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_fsm_error_red_arrow.png and b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_fsm_error_red_arrow.png differ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/bg_fsm_status_detail_close.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/bg_fsm_status_detail_close.xml index 49c0646059..1d9b7398e3 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/bg_fsm_status_detail_close.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/bg_fsm_status_detail_close.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/status_dialog_fsm_status_background.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/status_dialog_fsm_status_background.xml index 7e234745fd..f2042b04ad 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/status_dialog_fsm_status_background.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/status_dialog_fsm_status_background.xml @@ -3,18 +3,18 @@ android:shape="rectangle"> + android:endColor="#996C6C6C" + android:startColor="#40FFFFFF" /> diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_status_fsm_item_layout.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_status_fsm_item_layout.xml index 995b38abe8..ad87fa36f5 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_status_fsm_item_layout.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_status_fsm_item_layout.xml @@ -4,13 +4,14 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" + android:gravity="top" android:orientation="horizontal">