Merge remote-tracking branch 'origin/dev_robotaxi-d_231031_6.2.0' into dev_robotaxi-d_231031_6.2.0
This commit is contained in:
@@ -37,6 +37,9 @@ class MsgBoxConfig {
|
||||
//录包信息缓存列表
|
||||
@JvmField
|
||||
var recordBagList: ArrayList<MsgBoxBean> = ArrayList()
|
||||
//播放小智语音消息时的未播放消息缓存列表
|
||||
@JvmField
|
||||
var unPlayList: ArrayList<MsgBoxBean> = ArrayList()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -45,9 +45,10 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
initView()
|
||||
}
|
||||
private val TAG = "DriverMsgBoxListView"
|
||||
private var noticeList: ArrayList<MsgBoxBean> ?= null
|
||||
private var ipcReportList: ArrayList<MsgBoxBean> ?= null
|
||||
private var badCaseList: ArrayList<MsgBoxBean> ?= null
|
||||
private var noticeList: ArrayList<MsgBoxBean> ?= null //通知消息列表
|
||||
private var fmList: ArrayList<MsgBoxBean> ?= null //FM信息消息列表
|
||||
private var ipcReportList: ArrayList<MsgBoxBean> ?= null //车辆系统信息消息列表
|
||||
private var badCaseList: ArrayList<MsgBoxBean> ?= null//录包消息列表
|
||||
private var driverMsgBoxListAdapter: DriverMsgBoxListAdapter ?=null
|
||||
private var linearLayoutManager: LinearLayoutManager ?= null
|
||||
|
||||
@@ -71,9 +72,11 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
//通知
|
||||
tvMsgNotice.setOnClickListener {
|
||||
tvMsgNotice.setTextColor(resources.getColor(R.color.msg_box_title_color))
|
||||
tvMsgFm.setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
tvMsgIpcReport.setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
tvMsgBadCase.setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
viewNoticeDivider.visibility = View.VISIBLE
|
||||
viewFmDivider.visibility = View.GONE
|
||||
viewIpcReportDivider.visibility = View.GONE
|
||||
viewBadCaseDivider.visibility = View.GONE
|
||||
MsgBoxConfig.setUserRecord(0)
|
||||
@@ -86,15 +89,36 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
}
|
||||
//FM信息
|
||||
tvMsgFm.setOnClickListener {
|
||||
tvMsgNotice.setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
tvMsgFm.setTextColor(resources.getColor(R.color.msg_box_title_color))
|
||||
tvMsgIpcReport.setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
tvMsgBadCase.setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
viewNoticeDivider.visibility = View.GONE
|
||||
viewFmDivider.visibility = View.VISIBLE
|
||||
viewIpcReportDivider.visibility = View.GONE
|
||||
viewBadCaseDivider.visibility = View.GONE
|
||||
MsgBoxConfig.setUserRecord(1)
|
||||
if(fmList == null){
|
||||
rvMsgBoxList.visibility = View.GONE
|
||||
}else{
|
||||
driverMsgBoxListAdapter?.setData(fmList!!)
|
||||
rvMsgBoxList.visibility = View.VISIBLE
|
||||
rvMsgBoxList.scrollToPosition(0)
|
||||
}
|
||||
}
|
||||
//车辆系统信息
|
||||
tvMsgIpcReport.setOnClickListener {
|
||||
tvMsgNotice.setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
tvMsgFm.setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
tvMsgIpcReport.setTextColor(resources.getColor(R.color.msg_box_title_color))
|
||||
tvMsgBadCase.setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
viewNoticeDivider.visibility = View.GONE
|
||||
viewFmDivider.visibility = View.GONE
|
||||
viewIpcReportDivider.visibility = View.VISIBLE
|
||||
viewBadCaseDivider.visibility = View.GONE
|
||||
MsgBoxConfig.setUserRecord(1)
|
||||
MsgBoxConfig.setUserRecord(2)
|
||||
if(ipcReportList == null){
|
||||
rvMsgBoxList.visibility = View.GONE
|
||||
}else{
|
||||
@@ -107,12 +131,14 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
//录包
|
||||
tvMsgBadCase.setOnClickListener {
|
||||
tvMsgNotice.setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
tvMsgFm.setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
tvMsgIpcReport.setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
tvMsgBadCase.setTextColor(resources.getColor(R.color.msg_box_title_color))
|
||||
viewNoticeDivider.visibility = View.GONE
|
||||
viewFmDivider.visibility = View.GONE
|
||||
viewIpcReportDivider.visibility = View.GONE
|
||||
viewBadCaseDivider.visibility = View.VISIBLE
|
||||
MsgBoxConfig.setUserRecord(2)
|
||||
MsgBoxConfig.setUserRecord(3)
|
||||
if(badCaseList == null){
|
||||
rvMsgBoxList.visibility = View.GONE
|
||||
}else{
|
||||
@@ -127,11 +153,14 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
fun notifyData(){
|
||||
//获取当前Tab选择
|
||||
when(MsgBoxConfig.getUserRecord()){
|
||||
//通知消息
|
||||
0 ->{
|
||||
tvMsgNotice.setTextColor(resources.getColor(R.color.msg_box_title_color))
|
||||
tvMsgFm.setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
tvMsgIpcReport.setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
tvMsgBadCase.setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
viewNoticeDivider.visibility = View.VISIBLE
|
||||
viewFmDivider.visibility = View.GONE
|
||||
viewIpcReportDivider.visibility = View.GONE
|
||||
viewBadCaseDivider.visibility = View.GONE
|
||||
if(noticeList==null){
|
||||
@@ -142,11 +171,32 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
rvMsgBoxList.scrollToPosition(0)
|
||||
}
|
||||
}
|
||||
1 ->{
|
||||
//FM消息
|
||||
1->{
|
||||
tvMsgNotice.setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
tvMsgFm.setTextColor(resources.getColor(R.color.msg_box_title_color))
|
||||
tvMsgIpcReport.setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
tvMsgBadCase.setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
viewNoticeDivider.visibility = View.GONE
|
||||
viewFmDivider.visibility = View.VISIBLE
|
||||
viewIpcReportDivider.visibility = View.GONE
|
||||
viewBadCaseDivider.visibility = View.GONE
|
||||
if(fmList == null){
|
||||
rvMsgBoxList.visibility = View.GONE
|
||||
}else{
|
||||
driverMsgBoxListAdapter?.setData(fmList!!)
|
||||
rvMsgBoxList.visibility = View.VISIBLE
|
||||
rvMsgBoxList.scrollToPosition(0)
|
||||
}
|
||||
}
|
||||
//车辆系统信息消息
|
||||
2 ->{
|
||||
tvMsgNotice.setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
tvMsgFm.setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
tvMsgIpcReport.setTextColor(resources.getColor(R.color.msg_box_title_color))
|
||||
tvMsgBadCase.setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
viewNoticeDivider.visibility = View.GONE
|
||||
viewFmDivider.visibility = View.GONE
|
||||
viewIpcReportDivider.visibility = View.VISIBLE
|
||||
viewBadCaseDivider.visibility = View.GONE
|
||||
if(ipcReportList == null){
|
||||
@@ -157,11 +207,14 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
rvMsgBoxList.scrollToPosition(0)
|
||||
}
|
||||
}
|
||||
2 ->{
|
||||
//录包消息
|
||||
3 ->{
|
||||
tvMsgNotice.setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
tvMsgFm.setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
tvMsgIpcReport.setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
tvMsgBadCase.setTextColor(resources.getColor(R.color.msg_box_title_color))
|
||||
viewNoticeDivider.visibility = View.GONE
|
||||
viewFmDivider.visibility = View.GONE
|
||||
viewIpcReportDivider.visibility = View.GONE
|
||||
viewBadCaseDivider.visibility = View.VISIBLE
|
||||
if(badCaseList == null){
|
||||
|
||||
@@ -11,6 +11,8 @@ import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxCountDownBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
import com.mogo.eagle.core.data.msgbox.MsgCategory
|
||||
import com.mogo.eagle.core.data.msgbox.VoiceMsg
|
||||
import com.mogo.eagle.core.function.api.datacenter.msgbox.IMsgBoxEventListener
|
||||
import com.mogo.eagle.core.function.api.datacenter.msgbox.IMsgBoxListener
|
||||
import com.mogo.eagle.core.function.api.order.IOrderListener
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxEventListenerManager
|
||||
@@ -31,13 +33,17 @@ class PassengerMsgBoxBubbleView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMsgBoxListener, IOrderListener {
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMsgBoxListener, IOrderListener,
|
||||
IMsgBoxEventListener {
|
||||
|
||||
private val TAG = "PassengerMsgBoxBubbleView"
|
||||
private val dataList :ArrayList<MsgBoxCountDownBean> = ArrayList()
|
||||
private var passengerMsgBoxBubbleAdapter: PassengerMsgBoxBubbleAdapter ?= null
|
||||
private var isShowData = true
|
||||
private var isShowSummary = false //是否展示汇总消息
|
||||
private var isCacheMsg = false //是否缓存消息
|
||||
private var voiceIsShowing = false //小智语音消息是否正在展示
|
||||
private var voiceMsgBean: MsgBoxCountDownBean ?= null //小智语音消息封装
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.layout_passenger_msg_box_bubble, this, true)
|
||||
@@ -65,20 +71,95 @@ class PassengerMsgBoxBubbleView @JvmOverloads constructor(
|
||||
if(category == MsgCategory.NOTICE){
|
||||
if(msgBoxList.type == MsgBoxType.NOTICE || msgBoxList.type == MsgBoxType.V2X
|
||||
|| msgBoxList.type == MsgBoxType.OBU){
|
||||
if(msgBoxList.sourceType == DataSourceType.SUMMARY){
|
||||
//在一次订单中汇总消息只展示一次
|
||||
if(isShowSummary){
|
||||
operationalData(msgBoxList)
|
||||
isShowSummary = false
|
||||
}
|
||||
if(isCacheMsg){
|
||||
//将消息缓存到未播放列表等待小智语音播放完成后取出播放
|
||||
MsgBoxConfig.unPlayList.add(msgBoxList)
|
||||
}else{
|
||||
operationalData(msgBoxList)
|
||||
//实时播放消息
|
||||
notifyMsg(msgBoxList)
|
||||
}
|
||||
}
|
||||
}
|
||||
if(category == MsgCategory.VOICE_INFO){
|
||||
if(msgBoxList.type == MsgBoxType.VOICE){
|
||||
executeVoiceInfo(msgBoxList)
|
||||
}
|
||||
}
|
||||
},UiThreadHandler.MODE.QUEUE)
|
||||
}
|
||||
|
||||
/**
|
||||
* 小智语音消息执行
|
||||
*/
|
||||
private fun executeVoiceInfo(msgBoxList: MsgBoxBean){
|
||||
val voiceMsg = msgBoxList.bean as VoiceMsg
|
||||
if(voiceMsg.isWakeUp && !voiceMsg.isWakeUpEnd){
|
||||
//有其他消息时,将其他消息缓存进未播放列表
|
||||
voiceIsShowing = true
|
||||
isCacheMsg = true
|
||||
//开始展示消息
|
||||
if(voiceMsgBean == null){
|
||||
voiceMsgBean = MsgBoxCountDownBean(msgBoxList)
|
||||
dataList.add(voiceMsgBean!!)
|
||||
}else{
|
||||
dataList.remove(voiceMsgBean)
|
||||
voiceMsgBean!!.msgBoxBean = msgBoxList
|
||||
dataList.add(voiceMsgBean!!)
|
||||
}
|
||||
passengerMsgBoxBubbleAdapter?.setData(dataList)
|
||||
}
|
||||
if(!voiceMsg.isWakeUp && voiceMsg.isWakeUpEnd){
|
||||
//关闭消息展示
|
||||
dataList.remove(voiceMsgBean)
|
||||
passengerMsgBoxBubbleAdapter?.setData(dataList)
|
||||
//如果未播放列表中有未播放的消息则陆续展示消息,新来的消息继续放到未播放列表中,
|
||||
//如果未播放消息列表为空,则立刻改变状态,即使播放新消息
|
||||
voiceIsShowing = false
|
||||
handleCachedMsg()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 播放缓存消息
|
||||
*/
|
||||
private fun handleCachedMsg(){
|
||||
if(MsgBoxConfig.unPlayList.isEmpty()){
|
||||
isCacheMsg = false
|
||||
}else{
|
||||
//开始播放缓存未播放消息
|
||||
val iterator = MsgBoxConfig.unPlayList.iterator()
|
||||
while(iterator.hasNext()){
|
||||
val msg = iterator.next()
|
||||
if(passengerMsgBoxBubbleAdapter!!.getDataSize()<3){
|
||||
notifyMsg(msg)
|
||||
iterator.remove()
|
||||
}
|
||||
}
|
||||
if(MsgBoxConfig.unPlayList.isEmpty()){
|
||||
isCacheMsg = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通知新消息展示
|
||||
*/
|
||||
private fun notifyMsg(msgBoxList: MsgBoxBean){
|
||||
if(msgBoxList.sourceType == DataSourceType.SUMMARY){
|
||||
//在一次订单中汇总消息只展示一次
|
||||
if(isShowSummary){
|
||||
operationalData(msgBoxList)
|
||||
isShowSummary = false
|
||||
}
|
||||
}else{
|
||||
operationalData(msgBoxList)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理播放消息
|
||||
*/
|
||||
private fun operationalData(msgBoxList: MsgBoxBean){
|
||||
MsgBoxConfig.noticeList.add(msgBoxList)
|
||||
if(isShowData){
|
||||
@@ -93,16 +174,28 @@ class PassengerMsgBoxBubbleView @JvmOverloads constructor(
|
||||
super.onAttachedToWindow()
|
||||
CallerMsgBoxListenerManager.addListener(TAG,this)
|
||||
CallerOrderListenerManager.addListener(TAG,this)
|
||||
CallerMsgBoxEventListenerManager.addListener(TAG,this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerMsgBoxListenerManager.removeListener(TAG)
|
||||
CallerOrderListenerManager.removeListener(TAG)
|
||||
CallerMsgBoxEventListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
override fun onUpdateOrderStatus(inOrder: Boolean) {
|
||||
isShowSummary = inOrder
|
||||
}
|
||||
|
||||
/**
|
||||
* 播放缓存消息
|
||||
*/
|
||||
override fun onHandleCachedMsg() {
|
||||
if(voiceIsShowing){
|
||||
return
|
||||
}
|
||||
handleCachedMsg()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.msgbox.adapter
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.res.Resources
|
||||
import android.os.CountDownTimer
|
||||
import android.view.Gravity
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
@@ -17,6 +19,7 @@ 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.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.msgbox.PassengerMsgBoxBubbleView
|
||||
import com.mogo.eagle.core.utilcode.mogo.glide.transform.GlideRoundedCornersTransform
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils.getHourMinFormat
|
||||
@@ -34,6 +37,7 @@ class PassengerMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView
|
||||
private val notice: Int = 1
|
||||
private val v2x: Int = 2
|
||||
private val summary: Int = 3
|
||||
private val voice: Int = 4
|
||||
|
||||
fun setData(data: ArrayList<MsgBoxCountDownBean>){
|
||||
this.data = data
|
||||
@@ -43,6 +47,17 @@ class PassengerMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取列表数据个数
|
||||
*/
|
||||
fun getDataSize(): Int{
|
||||
return if(data.isNullOrEmpty()){
|
||||
0
|
||||
}else{
|
||||
data!!.size
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
|
||||
return when (viewType) {
|
||||
notice -> {
|
||||
@@ -53,6 +68,11 @@ class PassengerMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_box_summary,parent,false)
|
||||
BubbleSummaryHolder(view)
|
||||
}
|
||||
//小智语音
|
||||
voice -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_box_voice,parent,false)
|
||||
BubbleVoiceHolder(view)
|
||||
}
|
||||
else -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_box_v2x,parent,false)
|
||||
BubbleV2XHolder(view)
|
||||
@@ -108,23 +128,41 @@ class PassengerMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView
|
||||
}
|
||||
}
|
||||
}
|
||||
//小智语音消息
|
||||
is BubbleVoiceHolder -> {
|
||||
data?.let {
|
||||
val voiceMsg = it[position].msgBoxBean.bean as VoiceMsg
|
||||
holder.tvPassengerVoiceContent.text = voiceMsg.msg
|
||||
if(voiceMsg.isResp){
|
||||
//小智说的
|
||||
holder.tvPassengerVoiceContent.setTextColor(activity.resources.getColor(R.color.black))
|
||||
}else{
|
||||
//用户说的
|
||||
holder.tvPassengerVoiceContent.setTextColor(activity.resources.getColor(R.color.blue))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val msgBoxBean: MsgBoxCountDownBean = data!![position]
|
||||
msgBoxBean.countDownTimer =object: CountDownTimer(CallerMsgBoxManager.getDismissTime(),1000){
|
||||
override fun onTick(p0: Long) {
|
||||
if(msgBoxBean.msgBoxBean.type != MsgBoxType.VOICE){
|
||||
msgBoxBean.countDownTimer =object: CountDownTimer(CallerMsgBoxManager.getDismissTime(),CallerMsgBoxManager.getDismissTime()){
|
||||
override fun onTick(p0: Long) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
override fun onFinish() {
|
||||
data?.remove(msgBoxBean)
|
||||
notifyDataSetChanged()
|
||||
override fun onFinish() {
|
||||
data?.remove(msgBoxBean)
|
||||
notifyDataSetChanged()
|
||||
// notifyItemRemoved(index)
|
||||
// notifyItemRangeChanged(index,recordTypeEntity.size-index)
|
||||
}
|
||||
//通知消息盒子可以展示新的缓存消息
|
||||
CallerMsgBoxEventListenerManager.invokeHandleCachedMsg()
|
||||
}
|
||||
|
||||
}
|
||||
msgBoxBean.countDownTimer?.start()
|
||||
}
|
||||
msgBoxBean.countDownTimer?.start()
|
||||
}
|
||||
|
||||
override fun getItemCount() = data?.size ?: 0
|
||||
@@ -134,7 +172,9 @@ class PassengerMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView
|
||||
notice
|
||||
}else if(data!![position].msgBoxBean.type == MsgBoxType.V2X && data!![position].msgBoxBean.sourceType == DataSourceType.SUMMARY){
|
||||
summary
|
||||
} else{
|
||||
}else if(data!![position].msgBoxBean.type == MsgBoxType.VOICE){
|
||||
voice
|
||||
}else{
|
||||
v2x
|
||||
}
|
||||
}
|
||||
@@ -160,4 +200,9 @@ class PassengerMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView
|
||||
var tvPassengerSummaryTime: TextView = itemView.findViewById(R.id.tvPassengerSummaryTime)
|
||||
}
|
||||
|
||||
//小智语音消息
|
||||
class BubbleVoiceHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
var tvPassengerVoiceContent: TextView = itemView.findViewById(R.id.tvPassengerVoiceContent)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.eagle.core.widget.RoundCanClickConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="@dimen/dp_600"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#FFCEDCF7"
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:paddingStart="@dimen/dp_20"
|
||||
android:paddingEnd="@dimen/dp_20"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerVoiceContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="@dimen/sp_34"
|
||||
android:layout_margin="@dimen/dp_40"
|
||||
android:textColor="@color/black"
|
||||
android:gravity="center"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundCanClickConstraintLayout>
|
||||
@@ -8,11 +8,11 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvMsgNotice"
|
||||
android:layout_width="288dp"
|
||||
android:layout_height="90dp"
|
||||
android:layout_width="@dimen/dp_216"
|
||||
android:layout_height="@dimen/dp_90"
|
||||
android:text="通知"
|
||||
android:textColor="@color/msg_box_title_color"
|
||||
android:textSize="38dp"
|
||||
android:textSize="@dimen/sp_38"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:gravity="center"
|
||||
@@ -29,15 +29,39 @@
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvMsgIpcReport"
|
||||
android:layout_width="288dp"
|
||||
android:layout_height="90dp"
|
||||
android:text="车辆系统信息"
|
||||
android:id="@+id/tvMsgFm"
|
||||
android:layout_width="@dimen/dp_216"
|
||||
android:layout_height="@dimen/dp_90"
|
||||
android:text="FM信息"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="38dp"
|
||||
android:textSize="@dimen/sp_38"
|
||||
android:gravity="center"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/tvMsgNotice"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvMsgIpcReport"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:id="@+id/viewFmDivider"
|
||||
android:layout_width="62.7dp"
|
||||
android:layout_height="5dp"
|
||||
android:background="@drawable/bg_msg_box_divider"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvMsgFm"
|
||||
app:layout_constraintRight_toRightOf="@id/tvMsgFm"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvMsgFm"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvMsgIpcReport"
|
||||
android:layout_width="@dimen/dp_216"
|
||||
android:layout_height="@dimen/dp_90"
|
||||
android:text="系统信息"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="@dimen/sp_38"
|
||||
android:gravity="center"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/tvMsgFm"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvMsgBadCase"
|
||||
/>
|
||||
|
||||
@@ -54,11 +78,11 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvMsgBadCase"
|
||||
android:layout_width="288dp"
|
||||
android:layout_height="90dp"
|
||||
android:layout_width="@dimen/dp_216"
|
||||
android:layout_height="@dimen/dp_90"
|
||||
android:text="录包"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="38dp"
|
||||
android:textSize="@dimen/sp_38"
|
||||
android:gravity="center"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
@@ -78,10 +102,10 @@
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rvMsgBoxList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_height="@dimen/dp_0"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvMsgIpcReport"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
/>
|
||||
|
||||
@@ -2,6 +2,6 @@ package com.mogo.eagle.core.data.msgbox
|
||||
|
||||
import android.os.CountDownTimer
|
||||
|
||||
class MsgBoxCountDownBean(val msgBoxBean: MsgBoxBean){
|
||||
class MsgBoxCountDownBean(var msgBoxBean: MsgBoxBean){
|
||||
var countDownTimer: CountDownTimer ?= null
|
||||
}
|
||||
@@ -22,4 +22,7 @@ interface IMsgBoxEventListener {
|
||||
|
||||
//气泡态上报消息事件点击监听
|
||||
fun onBubbleReportClickEvent(msgBoxBean: MsgBoxBean){}
|
||||
|
||||
//通知播放缓存的未播放消息
|
||||
fun onHandleCachedMsg(){}
|
||||
}
|
||||
@@ -61,5 +61,15 @@ object CallerMsgBoxEventListenerManager: CallerBase<IMsgBoxEventListener>() {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通知播放缓存的未播放消息
|
||||
*/
|
||||
fun invokeHandleCachedMsg(){
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.onHandleCachedMsg()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user