[6.7.0][FSM] feat: 调整异常弹框样式;
This commit is contained in:
@@ -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<String>().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<String>) {
|
||||
private fun addFsmMsgItemView(msgArray: ArrayList<String>, 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)
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 277 B |
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 265 B |
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#000000" />
|
||||
<solid android:color="#B3000000" />
|
||||
<corners android:radius="@dimen/dp_30" />
|
||||
</shape>
|
||||
@@ -3,18 +3,18 @@
|
||||
android:shape="rectangle">
|
||||
|
||||
<gradient
|
||||
android:angle="90"
|
||||
android:angle="180"
|
||||
android:endColor="#2E323A"
|
||||
android:startColor="#3B3D44" />
|
||||
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:width="2px"
|
||||
android:color="#FFFFFF">
|
||||
<shape>
|
||||
<gradient
|
||||
android:angle="90"
|
||||
android:endColor="#6C6C6C"
|
||||
android:startColor="#FFFFFF" />
|
||||
android:endColor="#996C6C6C"
|
||||
android:startColor="#40FFFFFF" />
|
||||
</shape>
|
||||
</stroke>
|
||||
|
||||
|
||||
@@ -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">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/leftImageView"
|
||||
android:layout_width="@dimen/dp_18"
|
||||
android:layout_height="@dimen/dp_18"
|
||||
android:layout_gravity="top"
|
||||
android:layout_gravity="top|center_horizontal"
|
||||
android:layout_marginTop="@dimen/dp_10"
|
||||
android:src="@drawable/icon_fsm_error_red_arrow" />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user