[2.14.0]消息盒子车辆系统信息增加消息来源,调整折叠文字展示

This commit is contained in:
xuxinchao
2023-02-20 18:35:05 +08:00
parent b3045791a9
commit 79717282a9
2 changed files with 22 additions and 2 deletions

View File

@@ -143,6 +143,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
holder.tvReportTypeNormal.text = resultStr
holder.tvReportTypeOpen.text = resultStr
holder.tvReportReasonOpen.text = "原因:${reportEntity.msg}"
holder.tvReportSrcOpen.text = "消息来源:${reportEntity.src}"
var actionStr = ""
for (action in reportEntity.actionsList) {
actionStr =
@@ -157,6 +158,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
null,
null
)
holder.tvStatusSelect.text = "折叠"
holder.ivReportImageNormal.visibility = View.GONE
holder.tvReportLevelNormal.visibility = View.GONE
holder.tvReportTimeNormal.visibility = View.GONE
@@ -167,6 +169,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
holder.tvReportTimeOpen.visibility = View.VISIBLE
holder.tvReportTypeOpen.visibility = View.VISIBLE
holder.tvReportReasonOpen.visibility = View.VISIBLE
holder.tvReportSrcOpen.visibility = View.VISIBLE
holder.tvReportActionOpen.visibility = View.VISIBLE
} else {
holder.tvStatusSelect.setCompoundDrawablesWithIntrinsicBounds(
@@ -175,6 +178,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
null,
null
)
holder.tvStatusSelect.text = "展开"
holder.ivReportImageNormal.visibility = View.VISIBLE
holder.tvReportLevelNormal.visibility = View.VISIBLE
holder.tvReportTimeNormal.visibility = View.VISIBLE
@@ -185,6 +189,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
holder.tvReportTimeOpen.visibility = View.GONE
holder.tvReportTypeOpen.visibility = View.GONE
holder.tvReportReasonOpen.visibility = View.GONE
holder.tvReportSrcOpen.visibility = View.GONE
holder.tvReportActionOpen.visibility = View.GONE
}
}
@@ -340,6 +345,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
var tvReportTimeOpen: TextView = itemView.findViewById(R.id.tvReportTimeOpen)
var tvReportTypeOpen: TextView = itemView.findViewById(R.id.tvReportTypeOpen)
var tvReportReasonOpen: TextView = itemView.findViewById(R.id.tvReportReasonOpen)
var tvReportSrcOpen: TextView = itemView.findViewById(R.id.tvReportSrcOpen)
var tvReportActionOpen: TextView = itemView.findViewById(R.id.tvReportActionOpen)
}

View File

@@ -70,7 +70,7 @@
android:id="@+id/tvStatusSelect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="折叠"
android:text="展开"
android:textColor="#FFFFFFFF"
android:textSize="24dp"
app:layout_constraintTop_toTopOf="parent"
@@ -163,12 +163,26 @@
/>
<TextView
android:id="@+id/tvReportActionOpen"
android:id="@+id/tvReportSrcOpen"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/tvReportReasonOpen"
app:layout_constraintLeft_toLeftOf="@id/tvReportReasonOpen"
app:layout_constraintRight_toRightOf="@id/tvStatusSelect"
android:textColor="#B3FFFFFF"
android:textSize="28dp"
android:gravity="start"
android:lineSpacingMultiplier="1.2"
android:visibility="gone"
/>
<TextView
android:id="@+id/tvReportActionOpen"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintTop_toBottomOf="@id/tvReportSrcOpen"
app:layout_constraintLeft_toLeftOf="@id/tvReportSrcOpen"
app:layout_constraintRight_toRightOf="@id/tvStatusSelect"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginBottom="15dp"
android:textColor="#B3FFFFFF"