Merge remote-tracking branch 'origin/dev_robotaxi-d-app-module_2132_221223_2.13.2' into test_robotaxi-d-app-module_2132_221223_2.13.2.1
This commit is contained in:
@@ -12,6 +12,7 @@ import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
|||||||
import com.mogo.eagle.core.data.msgbox.*
|
import com.mogo.eagle.core.data.msgbox.*
|
||||||
import com.mogo.eagle.core.utilcode.mogo.glide.GlideApp
|
import com.mogo.eagle.core.utilcode.mogo.glide.GlideApp
|
||||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||||
|
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
|
||||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||||
import com.mogo.eagle.core.function.hmi.R
|
import com.mogo.eagle.core.function.hmi.R
|
||||||
import com.mogo.eagle.core.utilcode.mogo.glide.transform.GlideRoundedCornersTransform
|
import com.mogo.eagle.core.utilcode.mogo.glide.transform.GlideRoundedCornersTransform
|
||||||
@@ -112,7 +113,8 @@ class PassengerMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView
|
|||||||
holder.tvPassengerSummaryContent.text = summaryMsg.content
|
holder.tvPassengerSummaryContent.text = summaryMsg.content
|
||||||
holder.tvPassengerSummaryCheck.setOnClickListener {
|
holder.tvPassengerSummaryCheck.setOnClickListener {
|
||||||
//跳转全览模式
|
//跳转全览模式
|
||||||
CallerHmiManager.showSmallFragment()
|
// CallerHmiManager.showSmallFragment()
|
||||||
|
CallerMsgBoxEventListenerManager.invokeListener()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import androidx.recyclerview.widget.RecyclerView
|
|||||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
||||||
import com.mogo.eagle.core.data.msgbox.*
|
import com.mogo.eagle.core.data.msgbox.*
|
||||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||||
|
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
|
||||||
import com.mogo.eagle.core.function.hmi.R
|
import com.mogo.eagle.core.function.hmi.R
|
||||||
import com.mogo.eagle.core.utilcode.mogo.glide.GlideApp
|
import com.mogo.eagle.core.utilcode.mogo.glide.GlideApp
|
||||||
import com.mogo.eagle.core.utilcode.mogo.glide.transform.GlideRoundedCornersTransform
|
import com.mogo.eagle.core.utilcode.mogo.glide.transform.GlideRoundedCornersTransform
|
||||||
@@ -104,7 +105,8 @@ class PassengerMsgBoxListAdapter(private val activity: Activity): RecyclerView.A
|
|||||||
holder.tvPassengerSummaryContent.text = summaryMsg.content
|
holder.tvPassengerSummaryContent.text = summaryMsg.content
|
||||||
holder.tvPassengerSummaryCheck.setOnClickListener {
|
holder.tvPassengerSummaryCheck.setOnClickListener {
|
||||||
//跳转全览模式
|
//跳转全览模式
|
||||||
CallerHmiManager.showSmallFragment()
|
// CallerHmiManager.showSmallFragment()
|
||||||
|
CallerMsgBoxEventListenerManager.invokeListener()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -453,23 +453,23 @@ enum class EventTypeEnumNew(
|
|||||||
),
|
),
|
||||||
TYPE_USECASE_ID_ACCIDENT(
|
TYPE_USECASE_ID_ACCIDENT(
|
||||||
244.toString(),
|
244.toString(),
|
||||||
"事故",
|
"交通事故",
|
||||||
poiTypeSrcVr = R.drawable.v2x_icon_jiaotongshigu_vr,
|
poiTypeSrcVr = R.drawable.v2x_icon_jiaotongshigu_vr,
|
||||||
content = "前方%s米事故",
|
content = "前方%s米交通事故",
|
||||||
tts = "前方%s米事故"
|
tts = "前方%s米交通事故"
|
||||||
),
|
),
|
||||||
//------------车内标牌 obu end -------------->
|
//------------车内标牌 obu end -------------->
|
||||||
|
|
||||||
TYPE_SOCKET_ROAD_CONGESTION(
|
TYPE_SOCKET_ROAD_CONGESTION(
|
||||||
"10007",
|
"100071",
|
||||||
"道路拥堵",
|
"交通拥堵",
|
||||||
poiTypeSrcVr = R.drawable.v2x_icon_yongdu_vr,
|
poiTypeSrcVr = R.drawable.v2x_icon_yongdu_vr,
|
||||||
content = "前方%s米交通拥堵",
|
content = "前方%s米交通拥堵",
|
||||||
tts = "前方%s米交通拥堵"
|
tts = "前方%s米交通拥堵"
|
||||||
),
|
),
|
||||||
|
|
||||||
TYPE_SOCKET_ROAD_JINGZHI(
|
TYPE_SOCKET_ROAD_JINGZHI(
|
||||||
"10025",
|
"100251",
|
||||||
"前方%s米静止障碍物占道",
|
"前方%s米静止障碍物占道",
|
||||||
poiTypeSrcVr = R.drawable.v2x_icon_jingzhi_zhangai,
|
poiTypeSrcVr = R.drawable.v2x_icon_jingzhi_zhangai,
|
||||||
content = "前方%s米静止障碍物占道",
|
content = "前方%s米静止障碍物占道",
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package com.mogo.eagle.core.function.api.msgbox
|
||||||
|
/**
|
||||||
|
* @author XuXinChao
|
||||||
|
* @date 2023/1/16
|
||||||
|
* 消息盒子事件监听回调
|
||||||
|
*/
|
||||||
|
interface IMsgBoxEventListener {
|
||||||
|
fun onSummaryClickEvent()
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
package com.mogo.eagle.core.function.call.msgbox
|
||||||
|
|
||||||
|
import androidx.annotation.Nullable
|
||||||
|
import com.mogo.eagle.core.function.api.msgbox.IMsgBoxEventListener
|
||||||
|
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||||
|
import java.util.concurrent.ConcurrentHashMap
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author XuXinChao
|
||||||
|
* @date 2023/1/16
|
||||||
|
* 消息盒子事件监听管理
|
||||||
|
*/
|
||||||
|
object CallerMsgBoxEventListenerManager: CallerBase() {
|
||||||
|
|
||||||
|
private val statusListeners: ConcurrentHashMap<String, IMsgBoxEventListener> =
|
||||||
|
ConcurrentHashMap()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加数据监听
|
||||||
|
* @param tag 标记,用来注销监听使用
|
||||||
|
* @param listener 监听回调
|
||||||
|
*/
|
||||||
|
fun addListener(@Nullable tag: String,@Nullable listener: IMsgBoxEventListener){
|
||||||
|
if (statusListeners.containsKey(tag)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
statusListeners[tag] = listener
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除状态监听
|
||||||
|
* @param tag 标记,用来注销监听使用
|
||||||
|
*/
|
||||||
|
fun removeListener(@Nullable tag: String) {
|
||||||
|
if (!statusListeners.containsKey(tag)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
statusListeners.remove(tag)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除状态监听
|
||||||
|
* @param listener 要删除的监听对象
|
||||||
|
*/
|
||||||
|
fun removeListener(@Nullable listener: IMsgBoxEventListener){
|
||||||
|
if (!statusListeners.containsValue(listener)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var tag = ""
|
||||||
|
statusListeners.forEach {
|
||||||
|
if (it.value == listener) {
|
||||||
|
tag = it.key
|
||||||
|
statusListeners.remove(it.key)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 触发监听
|
||||||
|
*/
|
||||||
|
fun invokeListener(){
|
||||||
|
statusListeners.forEach {
|
||||||
|
val tag = it.key
|
||||||
|
val listener = it.value
|
||||||
|
listener.onSummaryClickEvent()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user