[6.9.0]消息盒子调整OTA升级结果ICON显示
This commit is contained in:
@@ -572,6 +572,11 @@ class MsgBoxTabAdapter(private val activity: Activity) :
|
||||
holder.tvOTATitle.text = otaMsg.title
|
||||
holder.tvOTAContent.text = otaMsg.des
|
||||
holder.tvOTATime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
if(otaMsg.type == "成功"){
|
||||
holder.ivOTAImage.setImageDrawable(getDrawable(R.drawable.icon_ota_msg_success))
|
||||
}else{
|
||||
holder.ivOTAImage.setImageDrawable(getDrawable(R.drawable.icon_ota_msg_fail))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -737,6 +742,7 @@ class MsgBoxTabAdapter(private val activity: Activity) :
|
||||
|
||||
//OTA升级
|
||||
class MsgBoxOTA(itemView: View) : RecyclerView.ViewHolder(itemView){
|
||||
var ivOTAImage: ImageView = itemView.findViewById(R.id.ivOTAImage)
|
||||
var tvOTATitle: TextView = itemView.findViewById(R.id.tvOTATitle)
|
||||
var tvOTATime: TextView = itemView.findViewById(R.id.tvOTATime)
|
||||
var tvOTAContent: TextView = itemView.findViewById(R.id.tvOTAContent)
|
||||
|
||||
@@ -353,6 +353,11 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
|
||||
holder.tvOTATitle.text = otaMsg.title
|
||||
holder.tvOTAContent.text = otaMsg.des
|
||||
holder.tvOTATime.text = TimeUtils.millis2String(it[position].msgBoxBean.timestamp,getHourMinFormat())
|
||||
if(otaMsg.type == "成功"){
|
||||
holder.ivOTAImage.setImageDrawable(getDrawable(R.drawable.icon_ota_msg_success))
|
||||
}else{
|
||||
holder.ivOTAImage.setImageDrawable(getDrawable(R.drawable.icon_ota_msg_fail))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -515,6 +520,7 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
|
||||
|
||||
//OTA升级消息
|
||||
class BubbleOTAHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
var ivOTAImage: ImageView = itemView.findViewById(R.id.ivOTAImage)
|
||||
var tvOTATitle: TextView = itemView.findViewById(R.id.tvOTATitle)
|
||||
var tvOTATime: TextView = itemView.findViewById(R.id.tvOTATime)
|
||||
var tvOTAContent: TextView = itemView.findViewById(R.id.tvOTAContent)
|
||||
|
||||
@@ -738,6 +738,11 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
holder.tvOTATitle.text = otaMsg.title
|
||||
holder.tvOTAContent.text = otaMsg.des
|
||||
holder.tvOTATime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
if(otaMsg.type == "成功"){
|
||||
holder.ivOTAImage.setImageDrawable(getDrawable(R.drawable.icon_ota_msg_success))
|
||||
}else{
|
||||
holder.ivOTAImage.setImageDrawable(getDrawable(R.drawable.icon_ota_msg_fail))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -922,6 +927,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
var tvOTATitle: TextView = itemView.findViewById(R.id.tvOTATitle)
|
||||
var tvOTATime: TextView = itemView.findViewById(R.id.tvOTATime)
|
||||
var tvOTAContent: TextView = itemView.findViewById(R.id.tvOTAContent)
|
||||
var ivOTAImage: ImageView = itemView.findViewById(R.id.ivOTAImage)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -158,6 +158,11 @@ class MsgBoxToastAdapter(private val activity: Activity) : RecyclerView.Adapter<
|
||||
val otaMsg = it[position].msgBoxBean.bean as OTAMsg
|
||||
holder.tvOTATitle.text = otaMsg.title
|
||||
holder.tvOTAContent.text = otaMsg.des
|
||||
if(otaMsg.type == "成功"){
|
||||
holder.ivOTAImage.setImageDrawable(getDrawable(R.drawable.icon_ota_msg_success))
|
||||
}else{
|
||||
holder.ivOTAImage.setImageDrawable(getDrawable(R.drawable.icon_ota_msg_fail))
|
||||
}
|
||||
}
|
||||
}
|
||||
//V2X消息
|
||||
@@ -388,6 +393,7 @@ class MsgBoxToastAdapter(private val activity: Activity) : RecyclerView.Adapter<
|
||||
class BubbleOTAHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
var tvOTATitle: TextView = itemView.findViewById(R.id.tvOTATitle)
|
||||
var tvOTAContent: TextView = itemView.findViewById(R.id.tvOTAContent)
|
||||
var ivOTAImage: ImageView = itemView.findViewById(R.id.ivOTAImage)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -49,7 +49,7 @@ class OTAUpgradeResultDialog(context: Context) :
|
||||
MsgBoxBean(
|
||||
MsgBoxType.OTA,
|
||||
OTAMsg(
|
||||
"0", "车辆部署任务执行结果", "车辆部署任务执行成功,请重启车辆")
|
||||
"成功", "车辆部署任务执行结果", "车辆部署任务执行成功,请重启车辆")
|
||||
)
|
||||
)
|
||||
AIAssist.getInstance(context).speakTTSVoice("车辆部署任务执行成功,请重启车辆")
|
||||
@@ -63,7 +63,7 @@ class OTAUpgradeResultDialog(context: Context) :
|
||||
MsgBoxBean(
|
||||
MsgBoxType.OTA,
|
||||
OTAMsg(
|
||||
"0", "车辆部署任务执行结果", "车辆部署任务执行失败,建议上报问题")
|
||||
"失败", "车辆部署任务执行结果", "车辆部署任务执行失败,建议上报问题")
|
||||
)
|
||||
)
|
||||
AIAssist.getInstance(context).speakTTSVoice("车辆部署任务执行失败")
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
@@ -19,7 +19,7 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_margin="25dp"
|
||||
android:src="@drawable/icon_nde"
|
||||
android:src="@drawable/icon_ota_msg_success"
|
||||
android:contentDescription="@string/ota_icon"
|
||||
/>
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_margin="25dp"
|
||||
android:src="@drawable/icon_nde"
|
||||
android:src="@drawable/icon_ota_msg_success"
|
||||
android:contentDescription="@string/ota_icon"
|
||||
/>
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivNdeImage"
|
||||
android:layout_width="@dimen/dp_120"
|
||||
android:layout_height="@dimen/dp_120"
|
||||
android:layout_width="@dimen/dp_152"
|
||||
android:layout_height="@dimen/dp_152"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:src="@drawable/icon_nde"
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivOTAImage"
|
||||
android:layout_width="@dimen/dp_120"
|
||||
android:layout_height="@dimen/dp_120"
|
||||
android:layout_width="@dimen/dp_152"
|
||||
android:layout_height="@dimen/dp_152"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:src="@drawable/icon_nde"
|
||||
android:src="@drawable/icon_ota_msg_success"
|
||||
android:contentDescription="@string/msg_box_toast_icon"
|
||||
/>
|
||||
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivNdeImage"
|
||||
android:layout_width="@dimen/dp_120"
|
||||
android:layout_height="@dimen/dp_120"
|
||||
android:layout_width="@dimen/dp_152"
|
||||
android:layout_height="@dimen/dp_152"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_14"
|
||||
android:contentDescription="@string/nde_icon"
|
||||
android:src="@drawable/icon_nde"
|
||||
/>
|
||||
@@ -20,9 +20,10 @@
|
||||
android:id="@+id/tvNdeTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/ivNdeImage"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivNdeImage"
|
||||
android:layout_marginStart="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:textSize="@dimen/sp_38"
|
||||
android:textColor="@color/white"
|
||||
android:textStyle="bold"
|
||||
|
||||
@@ -7,22 +7,23 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivOTAImage"
|
||||
android:layout_width="@dimen/dp_120"
|
||||
android:layout_height="@dimen/dp_120"
|
||||
android:layout_width="@dimen/dp_152"
|
||||
android:layout_height="@dimen/dp_152"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_14"
|
||||
android:contentDescription="@string/ota_icon"
|
||||
android:src="@drawable/icon_nde"
|
||||
android:src="@drawable/icon_ota_msg_success"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvOTATitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/ivOTAImage"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivOTAImage"
|
||||
android:layout_marginStart="@dimen/dp_30"
|
||||
android:layout_marginTop="@dimen/dp_30"
|
||||
android:textSize="@dimen/sp_38"
|
||||
android:textColor="@color/white"
|
||||
android:textStyle="bold"
|
||||
|
||||
Reference in New Issue
Block a user