Merge branch 'dev_robotaxi-d-app-module_2130_221116_2.13.0' into mutidev_robotaxi-d-app-module_2130_221116_2.13.0_multi_display

This commit is contained in:
donghongyu
2022-12-12 18:26:14 +08:00
9 changed files with 62 additions and 15 deletions

View File

@@ -11,7 +11,6 @@ import androidx.recyclerview.widget.LinearLayoutManager
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.msgbox.MsgCategory
import com.mogo.eagle.core.data.msgbox.OperationMsg
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxListener
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
@@ -19,7 +18,6 @@ import com.mogo.eagle.core.function.hmi.R
import com.mogo.eagle.core.function.hmi.ui.msgbox.adapter.DriverMsgBoxListAdapter
import com.mogo.eagle.core.function.msgbox.MsgBoxConfig
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.util.TimeUtils
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import kotlinx.android.synthetic.main.layout_driver_msg_box_list.view.*
import org.greenrobot.eventbus.EventBus
@@ -208,5 +206,4 @@ class DriverMsgBoxListView @JvmOverloads constructor(
driverMsgBoxListAdapter?.notifyItemRemoved(it.indexOf(msgBoxList))
}
}
}

View File

@@ -9,6 +9,7 @@ import android.widget.ImageView
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.mogo.eagle.core.data.enums.EventTypeEnum
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
import com.mogo.eagle.core.data.msgbox.*
import com.mogo.eagle.core.data.report.ReportEntity
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
@@ -81,7 +82,8 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
}
}else if(holder is BubbleNoticeHolder){
data?.let {
val noticeFrCloudMsg = it[position].bean as NoticeFrCloudMsg
val msgBoxBean = it[position].bean
val noticeFrCloudMsg = msgBoxBean as NoticeFrCloudMsg
if(noticeFrCloudMsg.type == 0){
val noticeNormalData = noticeFrCloudMsg.noticeNormalData
holder.tvNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
@@ -118,10 +120,17 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
}
}else if(holder is BubbleV2XHolder){
data?.let {
val v2XMsg = it[position].bean as V2XMsg
val msgBoxBean = it[position]
val v2XMsg = msgBoxBean.bean as V2XMsg
holder.tvV2XTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
holder.tvV2XContent.text = v2XMsg.content
holder.ivV2XImage.setImageDrawable(activity.resources.getDrawable(EventTypeEnum.getUpdateIconRes(v2XMsg.type)))
if(msgBoxBean.type == MsgBoxType.OBU){
holder.ivV2XImage.setImageDrawable(activity.resources.getDrawable(
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type)))
}else{
holder.ivV2XImage.setImageDrawable(activity.resources.getDrawable(
EventTypeEnum.getUpdateIconRes(v2XMsg.type)))
}
}
}

View File

@@ -10,6 +10,7 @@ import android.widget.TextView
import androidx.core.view.isVisible
import androidx.recyclerview.widget.RecyclerView
import com.mogo.eagle.core.data.enums.EventTypeEnum
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
import com.mogo.eagle.core.data.msgbox.*
import com.mogo.eagle.core.data.report.ReportEntity
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
@@ -209,10 +210,17 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : RecyclerView.Ada
}
}else if(holder is MsgBoxV2X){
data?.let {
val v2XMsg = it[position].bean as V2XMsg
val msgBoxBean = it[position]
val v2XMsg = msgBoxBean.bean as V2XMsg
holder.tvV2XTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
holder.tvV2XContent.text = v2XMsg.content
holder.ivV2XImage.setImageDrawable(activity.resources.getDrawable(EventTypeEnum.getUpdateIconRes(v2XMsg.type)))
if(msgBoxBean.type == MsgBoxType.OBU){
holder.ivV2XImage.setImageDrawable(activity.resources.getDrawable(
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type)))
}else{
holder.ivV2XImage.setImageDrawable(activity.resources.getDrawable(
EventTypeEnum.getUpdateIconRes(v2XMsg.type)))
}
}
}
}

View File

@@ -9,6 +9,7 @@ import android.widget.ImageView
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.mogo.eagle.core.data.enums.EventTypeEnum
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.msgbox.MsgBoxType
import com.mogo.eagle.core.data.msgbox.NoticeFrCloudMsg
@@ -91,11 +92,17 @@ class PassengerMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView
}
}else if(holder is BubbleV2XHolder){
data?.let {
val v2XMsg = it[position].bean as V2XMsg
val msgBoxBean = it[position]
val v2XMsg = msgBoxBean.bean as V2XMsg
holder.tvPassengerV2XTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
holder.tvPassengerV2XContent.text = v2XMsg.content
holder.ivPassengerV2XImage.setImageDrawable(activity.resources.getDrawable(
EventTypeEnum.getUpdateIconRes(v2XMsg.type)))
if(msgBoxBean.type == MsgBoxType.OBU){
holder.ivPassengerV2XImage.setImageDrawable(activity.resources.getDrawable(
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type)))
}else{
holder.ivPassengerV2XImage.setImageDrawable(activity.resources.getDrawable(
EventTypeEnum.getUpdateIconRes(v2XMsg.type)))
}
}
}
val msgBoxBean: MsgBoxBean = data!![position]

View File

@@ -8,6 +8,7 @@ import android.widget.ImageView
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.mogo.eagle.core.data.enums.EventTypeEnum
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.msgbox.MsgBoxType
import com.mogo.eagle.core.data.msgbox.NoticeFrCloudMsg
@@ -83,11 +84,17 @@ class PassengerMsgBoxListAdapter(private val activity: Activity): RecyclerView.A
}
}else if(holder is ListV2XHolder){
data?.let {
val v2XMsg = it[position].bean as V2XMsg
val msgBoxBean = it[position]
val v2XMsg = msgBoxBean.bean as V2XMsg
holder.tvPassengerV2XTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
holder.tvPassengerV2XContent.text = v2XMsg.content
holder.ivPassengerV2XImage.setImageDrawable(activity.resources.getDrawable(
EventTypeEnum.getUpdateIconRes(v2XMsg.type)))
if(msgBoxBean.type == MsgBoxType.OBU){
holder.ivPassengerV2XImage.setImageDrawable(activity.resources.getDrawable(
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type)))
}else{
holder.ivPassengerV2XImage.setImageDrawable(activity.resources.getDrawable(
EventTypeEnum.getUpdateIconRes(v2XMsg.type)))
}
}
}
}