[2.13.0]消息盒子
This commit is contained in:
@@ -9,6 +9,7 @@ import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainLogParam
|
||||
import com.mogo.eagle.core.data.deva.scene.SceneModule
|
||||
import com.mogo.eagle.core.data.deva.scene.SceneTAG
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.function.api.devatools.IDevaToolsProvider
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.BadCaseManager
|
||||
import com.zhjt.mogo_core_function_devatools.funcconfig.FuncConfigCenter.Companion.bizConfigCenter
|
||||
@@ -97,8 +98,8 @@ class DevaToolsProvider : IDevaToolsProvider {
|
||||
BadCaseManager.initAiCollect(view)
|
||||
}
|
||||
|
||||
override fun onReceiveBadCaseRecord(recordKey: Long,fileName: String,activity: Activity) {
|
||||
BadCaseManager.onReceiveBadCaseRecord(recordKey, fileName, activity)
|
||||
override fun onReceiveBadCaseRecord(msgBoxBean: MsgBoxBean,activity: Activity,countdown: Boolean) {
|
||||
BadCaseManager.onReceiveBadCaseRecord(msgBoxBean, activity,countdown)
|
||||
}
|
||||
|
||||
override fun showFeedbackWindow(ctx: Context) {
|
||||
|
||||
@@ -14,6 +14,8 @@ import androidx.lifecycle.LifecycleEventObserver
|
||||
import androidx.lifecycle.LifecycleOwner
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.RecordBagMsg
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotVehicleStateListenerManager
|
||||
import com.mogo.eagle.core.utilcode.kotlin.PX
|
||||
import com.mogo.eagle.core.utilcode.kotlin.lifecycleOwner
|
||||
@@ -23,10 +25,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_
|
||||
import com.mogo.eagle.core.utilcode.reminder.Reminder
|
||||
import com.mogo.eagle.core.utilcode.reminder.api.IReminder
|
||||
import com.mogo.eagle.core.utilcode.reminder.api.IReminder.IGlobalStateChangeListener
|
||||
import com.mogo.eagle.core.utilcode.util.ClickUtils
|
||||
import com.mogo.eagle.core.utilcode.util.NetworkUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.eagle.core.utilcode.util.*
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.biz.*
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.consts.BadCaseConfig
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.repository.db.entity.AutoPilotRecord
|
||||
@@ -168,19 +167,29 @@ internal object BadCaseManager : LifecycleEventObserver {
|
||||
}
|
||||
}
|
||||
|
||||
fun onReceiveBadCaseRecord(recordKey: Long,fileName: String,activity: Activity) {
|
||||
fun onReceiveBadCaseRecord(msgBoxBean: MsgBoxBean,activity: Activity,countdown: Boolean) {
|
||||
CallerLogger.d("$M_DEVA$TAG", "收到录包结果回调${record}")
|
||||
CallerLogger.d("$M_DEVA$TAG", "开始创建被动录包弹窗,window num=${BadCaseConfig.windowNum}")
|
||||
CallerLogger.d("$M_DEVA$TAG","key=${recordKey};filename${fileName}")
|
||||
ThreadUtils.runOnUiThread {
|
||||
val passiveBadCaseWindow = PassiveBadCaseWindow(activity)
|
||||
passiveBadCaseWindow.setRecord(recordKey.toString(),fileName)
|
||||
passiveBadCaseWindow.setRecord(msgBoxBean)
|
||||
passiveBadCaseWindow.setClickListener(object: PassiveBadCaseWindow.ClickListener{
|
||||
override fun closeWindow() {
|
||||
passiveBadCaseWindow.hideFloatWindow()
|
||||
}
|
||||
})
|
||||
passiveBadCaseWindow.showFloatWindow()
|
||||
if(countdown){
|
||||
val countDownTimer = object: CountDownTimer(10000,1000){
|
||||
override fun onTick(p0: Long) {
|
||||
}
|
||||
|
||||
override fun onFinish() {
|
||||
passiveBadCaseWindow.hideFloatWindow()
|
||||
}
|
||||
}
|
||||
countDownTimer.start()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,8 +16,11 @@ import android.widget.TextView
|
||||
import com.google.android.flexbox.FlexboxLayout
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.eagle.core.data.app.AppConfigInfo
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.RecordBagMsg
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarStateListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_DEVA
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast
|
||||
@@ -59,6 +62,7 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
private var uploadReason: String = String() //上报原因,标签
|
||||
private var recordKey: String?=null //录制bag包key
|
||||
private var recordFileName: String?=null //录制文件包名
|
||||
private var boxBean: MsgBoxBean ?= null
|
||||
private var longitude: Double?=null
|
||||
private var latitude: Double?=null
|
||||
|
||||
@@ -132,11 +136,15 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
}else{
|
||||
uploadAudio()
|
||||
}
|
||||
//删除记录
|
||||
CallerMsgBoxManager.removeRecordInfo(mActivity, boxBean!!, recordKey!!)
|
||||
}
|
||||
|
||||
tvPassiveCancel.setOnClickListener {
|
||||
BadCaseConfig.windowNum--
|
||||
clickListener?.closeWindow()
|
||||
//删除记录
|
||||
CallerMsgBoxManager.removeRecordInfo(mActivity, boxBean!!, recordKey!!)
|
||||
}
|
||||
|
||||
mWindowParams = WindowManager.LayoutParams()
|
||||
@@ -343,9 +351,11 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene
|
||||
if (mFloatLayout.parent != null) mWindowManager!!.removeView(mFloatLayout)
|
||||
}
|
||||
|
||||
fun setRecord(key:String,fileName:String){
|
||||
recordKey = key
|
||||
recordFileName = fileName
|
||||
fun setRecord(msgBoxBean: MsgBoxBean){
|
||||
boxBean = msgBoxBean
|
||||
val recordBagMsg = (msgBoxBean.bean as RecordBagMsg)
|
||||
recordKey = recordBagMsg.key.toString()
|
||||
recordFileName = recordBagMsg.fileName
|
||||
}
|
||||
|
||||
fun setClickListener(clickListener: ClickListener) {
|
||||
|
||||
@@ -76,6 +76,7 @@ import com.mogo.eagle.core.function.hmi.ui.bindingcar.ToBindingCarDialog
|
||||
import com.mogo.eagle.core.function.hmi.ui.bindingcar.UpgradeAppDialog
|
||||
import com.mogo.eagle.core.function.hmi.ui.camera.CameraListView
|
||||
import com.mogo.eagle.core.function.hmi.ui.camera.RoadVideoDialog
|
||||
import com.mogo.eagle.core.function.hmi.ui.msgbox.PassengerMsgBoxBubbleView
|
||||
import com.mogo.eagle.core.function.hmi.ui.notice.NoticeCheckDialog
|
||||
import com.mogo.eagle.core.function.hmi.ui.notice.NoticeTrafficDialog
|
||||
import com.mogo.eagle.core.function.hmi.ui.setting.DebugSettingView
|
||||
@@ -171,6 +172,8 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
private var reportListFloatWindow: ReportListFloatWindow? = null
|
||||
private var ipcReportWindow: IPCReportWindow? = null
|
||||
|
||||
private var passengerMsgBoxBubbleView: PassengerMsgBoxBubbleView ?= null
|
||||
|
||||
private var adUpgradeDialog: AdUpgradeDialog? = null
|
||||
|
||||
private var lastSpeakJob: Job? = null
|
||||
@@ -297,7 +300,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
}
|
||||
}
|
||||
|
||||
cbMsgBox.setOnCheckedChangeListener { _, isChecked ->
|
||||
cbMsgBoxDriver.setOnCheckedChangeListener { _, isChecked ->
|
||||
if(isChecked){
|
||||
viewDriverMsgBoxList.visibility = View.VISIBLE
|
||||
viewDriverMsgBoxBubble.visibility = View.GONE
|
||||
@@ -307,6 +310,19 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
}
|
||||
}
|
||||
|
||||
cbMsgBoxPassenger.setOnCheckedChangeListener { _, isChecked ->
|
||||
|
||||
}
|
||||
|
||||
if(AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){
|
||||
cbMsgBoxDriver.visibility = View.VISIBLE
|
||||
viewDriverMsgBoxBubble.visibility = View.VISIBLE
|
||||
}
|
||||
if(AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode) &&
|
||||
AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)){
|
||||
cbMsgBoxPassenger.visibility = View.VISIBLE
|
||||
viewPassengerMsgBoxBubble.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
|
||||
@OptIn(ExperimentalCoroutinesApi::class)
|
||||
|
||||
@@ -1,16 +1,20 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.msgbox
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.widget.LinearLayout
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.view.marginTop
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
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.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.msgbox.adapter.DriverMsgBoxBubbleAdapter
|
||||
@@ -35,19 +39,27 @@ class DriverMsgBoxBubbleView @JvmOverloads constructor(
|
||||
var driverMsgBoxBubbleAdapter: DriverMsgBoxBubbleAdapter ?=null
|
||||
|
||||
private val TAG = "DriverMsgBoxBubbleView"
|
||||
private val dataList :ArrayList<MsgBoxBean> = ArrayList()
|
||||
|
||||
private fun initView() {
|
||||
val linearLayoutManager = LinearLayoutManager(context)
|
||||
linearLayoutManager.orientation = LinearLayoutManager.VERTICAL
|
||||
linearLayoutManager.stackFromEnd = true
|
||||
linearLayoutManager.reverseLayout = true
|
||||
driverMsgBoxBubbleAdapter = DriverMsgBoxBubbleAdapter()
|
||||
driverMsgBoxBubbleAdapter = DriverMsgBoxBubbleAdapter(context as Activity)
|
||||
rvBubbleList.adapter = driverMsgBoxBubbleAdapter
|
||||
rvBubbleList.layoutManager = linearLayoutManager
|
||||
}
|
||||
|
||||
override fun onDataChanged(category: MsgCategory, msgBoxList: MsgBoxBean) {
|
||||
|
||||
override fun onDataChanged(category: MsgCategory, msgBoxBean: MsgBoxBean) {
|
||||
if(category == MsgCategory.RECORD_BAG){
|
||||
//弹出被动录包弹窗
|
||||
CallerDevaToolsManager.onReceiveBadCaseRecord(msgBoxBean,context as Activity,true)
|
||||
}else{
|
||||
dataList.add(msgBoxBean)
|
||||
driverMsgBoxBubbleAdapter?.setData(dataList)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
@@ -60,15 +72,12 @@ class DriverMsgBoxBubbleView @JvmOverloads constructor(
|
||||
CallerMsgBoxListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
// var i = 0
|
||||
//
|
||||
// fun setData(){
|
||||
// val list :ArrayList<MsgBoxBean> = ArrayList()
|
||||
// val one = MsgBoxBean(MsgBoxType.OPERATION, OperationMsg(System.currentTimeMillis(),"测试"))
|
||||
// val two = MsgBoxBean(MsgBoxType.OPERATION, OperationMsg(System.currentTimeMillis(),"测试"))
|
||||
// val three = MsgBoxBean(MsgBoxType.OPERATION, OperationMsg(System.currentTimeMillis(),"测试"))
|
||||
// list.add(one)
|
||||
// list.add(two)
|
||||
// list.add(three)
|
||||
// driverMsgBoxBubbleAdapter?.setData(list)
|
||||
// val one = MsgBoxBean(MsgBoxType.OPERATION, OperationMsg(System.currentTimeMillis(),"测试"+i++))
|
||||
// dataList.add(one)
|
||||
// driverMsgBoxBubbleAdapter?.setData(dataList)
|
||||
// }
|
||||
|
||||
}
|
||||
@@ -39,6 +39,16 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
val driverMsgBoxListAdapter= DriverMsgBoxListAdapter(context as Activity)
|
||||
rvMsgBoxList.adapter = driverMsgBoxListAdapter
|
||||
rvMsgBoxList.layoutManager = LinearLayoutManager(context)
|
||||
//获取通知消息列表
|
||||
val noticeList: List<MsgBoxBean>? = CallerMsgBoxManager.getCachedNotifyData()
|
||||
if(noticeList==null){
|
||||
rvMsgBoxList.visibility = View.GONE
|
||||
}else{
|
||||
driverMsgBoxListAdapter.setData(noticeList)
|
||||
rvMsgBoxList.visibility = View.VISIBLE
|
||||
rvMsgBoxList.scrollToPosition(0)
|
||||
}
|
||||
|
||||
|
||||
//通知
|
||||
tvMsgNotice.setOnClickListener {
|
||||
@@ -50,6 +60,13 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
viewBadCaseDivider.visibility = View.GONE
|
||||
//获取通知消息列表
|
||||
val noticeList: List<MsgBoxBean>? = CallerMsgBoxManager.getCachedNotifyData()
|
||||
if(noticeList==null){
|
||||
rvMsgBoxList.visibility = View.GONE
|
||||
}else{
|
||||
driverMsgBoxListAdapter.setData(noticeList.reversed())
|
||||
rvMsgBoxList.visibility = View.VISIBLE
|
||||
rvMsgBoxList.scrollToPosition(0)
|
||||
}
|
||||
|
||||
// val nList: ArrayList<MsgBoxBean> = ArrayList()
|
||||
// val one = MsgBoxBean(MsgBoxType.OPERATION, OperationMsg(System.currentTimeMillis(),"通知1",2))
|
||||
@@ -80,6 +97,13 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
|
||||
//获取车辆系统信息列表
|
||||
val ipcReportList: List<MsgBoxBean>? = CallerMsgBoxManager.getCachedSysInfoData()
|
||||
if(ipcReportList == null){
|
||||
rvMsgBoxList.visibility = View.GONE
|
||||
}else{
|
||||
driverMsgBoxListAdapter.setData(ipcReportList.reversed())
|
||||
rvMsgBoxList.visibility = View.VISIBLE
|
||||
rvMsgBoxList.scrollToPosition(0)
|
||||
}
|
||||
|
||||
// val ipcList: ArrayList<MsgBoxBean> = ArrayList()
|
||||
// val resultList:ArrayList<String> = ArrayList()
|
||||
@@ -123,10 +147,14 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
viewBadCaseDivider.visibility = View.VISIBLE
|
||||
|
||||
//获取录包信息列表
|
||||
// val badCaseList: List<MsgBoxBean>? = CallerMsgBoxManager.getCachedRecordBagData()
|
||||
// badCaseList?.let {
|
||||
// driverMsgBoxListAdapter.setData(it)
|
||||
// }
|
||||
val badCaseList: List<MsgBoxBean>? = CallerMsgBoxManager.getCachedRecordBagData()
|
||||
if(badCaseList == null){
|
||||
rvMsgBoxList.visibility = View.GONE
|
||||
}else{
|
||||
driverMsgBoxListAdapter.setData(badCaseList.reversed())
|
||||
rvMsgBoxList.visibility = View.VISIBLE
|
||||
rvMsgBoxList.scrollToPosition(0)
|
||||
}
|
||||
|
||||
// val list : ArrayList<MsgBoxBean> = ArrayList()
|
||||
// val one = MsgBoxBean(MsgBoxType.RECORD, RecordBagMsg(3457774,1,235,2,"",""))
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.msgbox
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.graphics.PixelFormat
|
||||
import android.util.AttributeSet
|
||||
import android.util.DisplayMetrics
|
||||
import android.view.*
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
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.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.msgbox.adapter.PassengerMsgBoxBubbleAdapter
|
||||
import com.mogo.eagle.core.utilcode.util.BarUtils
|
||||
import kotlinx.android.synthetic.main.layout_passenger_msg_box_bubble.view.*
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
* @description 乘客端消息盒子气泡列表视图
|
||||
* @since: 2022/11/29
|
||||
*/
|
||||
class PassengerMsgBoxBubbleView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IMsgBoxListener {
|
||||
|
||||
private val TAG = "PassengerMsgBoxBubbleView"
|
||||
var passengerMsgBoxBubbleAdapter: PassengerMsgBoxBubbleAdapter ?= null
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.layout_passenger_msg_box_bubble, this, true)
|
||||
initView()
|
||||
}
|
||||
|
||||
private fun initView(){
|
||||
val linearLayoutManager = LinearLayoutManager(context)
|
||||
linearLayoutManager.orientation = LinearLayoutManager.VERTICAL
|
||||
linearLayoutManager.stackFromEnd = true
|
||||
linearLayoutManager.reverseLayout = true
|
||||
passengerMsgBoxBubbleAdapter = PassengerMsgBoxBubbleAdapter()
|
||||
rvPassengerBubbleList.adapter = passengerMsgBoxBubbleAdapter
|
||||
rvPassengerBubbleList.layoutManager = linearLayoutManager
|
||||
|
||||
// setData()
|
||||
}
|
||||
|
||||
override fun onDataChanged(category: MsgCategory, msgBoxList: MsgBoxBean) {
|
||||
|
||||
}
|
||||
|
||||
// fun setData(){
|
||||
// val list :ArrayList<MsgBoxBean> = ArrayList()
|
||||
// val one = MsgBoxBean(MsgBoxType.OPERATION, OperationMsg(System.currentTimeMillis(),"测试"))
|
||||
// val two = MsgBoxBean(MsgBoxType.OPERATION, OperationMsg(System.currentTimeMillis(),"测试"))
|
||||
// val three = MsgBoxBean(MsgBoxType.OPERATION, OperationMsg(System.currentTimeMillis(),"测试"))
|
||||
// list.add(one)
|
||||
// list.add(two)
|
||||
// list.add(three)
|
||||
// passengerMsgBoxBubbleAdapter?.setData(list)
|
||||
// }
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerMsgBoxListenerManager.addListener(TAG,this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerMsgBoxListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,18 +1,26 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.msgbox.adapter
|
||||
|
||||
import android.app.Activity
|
||||
import android.os.CountDownTimer
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
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.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
import com.mogo.eagle.core.data.msgbox.OperationMsg
|
||||
import com.mogo.eagle.core.data.msgbox.V2XMsg
|
||||
import com.mogo.eagle.core.data.notice.NoticeNormalData
|
||||
import com.mogo.eagle.core.data.report.ReportEntity
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
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.transform.GlideRoundedCornersTransform
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils.getHourMinFormat
|
||||
|
||||
@@ -21,22 +29,22 @@ import com.mogo.eagle.core.utilcode.util.TimeUtils.getHourMinFormat
|
||||
* @description 司机端消息盒子气泡视图RecyclerView适配器
|
||||
* @since: 2022/11/25
|
||||
*/
|
||||
class DriverMsgBoxBubbleAdapter : RecyclerView.Adapter<RecyclerView.ViewHolder>(){
|
||||
class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.Adapter<RecyclerView.ViewHolder>(){
|
||||
|
||||
private var data: ArrayList<MsgBoxBean> ?= null
|
||||
|
||||
private val operation: Int = 1
|
||||
private val notice: Int = 2
|
||||
private val v2x: Int = 3
|
||||
private val obu: Int = 4
|
||||
private val report: Int = 5
|
||||
private val record: Int = 6
|
||||
private val traffic: Int = 7
|
||||
private val report: Int = 4
|
||||
|
||||
var countDownTimer: CountDownTimer?=null
|
||||
|
||||
fun setData(data: ArrayList<MsgBoxBean>){
|
||||
this.data = data
|
||||
if(data.size>4){
|
||||
data.removeAt(0)
|
||||
}
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
@@ -44,9 +52,15 @@ class DriverMsgBoxBubbleAdapter : RecyclerView.Adapter<RecyclerView.ViewHolder>(
|
||||
if(viewType == operation){
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_operation,parent,false)
|
||||
return BubbleOperationHolder(view)
|
||||
}else{
|
||||
}else if(viewType == report){
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_report,parent,false)
|
||||
return BubbleReportHolder(view)
|
||||
}else if(viewType == notice){
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_box_notice,parent,false)
|
||||
return BubbleNoticeHolder(view)
|
||||
}else{
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_box_v2x,parent,false)
|
||||
return BubbleV2XHolder(view)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,6 +82,29 @@ class DriverMsgBoxBubbleAdapter : RecyclerView.Adapter<RecyclerView.ViewHolder>(
|
||||
}
|
||||
holder.tvBubbleReportType.text = resultStr
|
||||
}
|
||||
}else if(holder is BubbleNoticeHolder){
|
||||
data?.let {
|
||||
val noticeNormalData = it[position].bean as NoticeNormalData
|
||||
holder.tvNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvNoticeContent.text = noticeNormalData.content
|
||||
GlideApp.with(activity).load(noticeNormalData.imageUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivNoticeImage)
|
||||
holder.tvNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
CallerHmiManager.showNoticeNormalData(noticeNormalData)
|
||||
}
|
||||
}
|
||||
}else if(holder is BubbleV2XHolder){
|
||||
data?.let {
|
||||
val v2XMsg = it[position].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)))
|
||||
}
|
||||
}
|
||||
|
||||
val msgBoxBean: MsgBoxBean = data!![position]
|
||||
@@ -93,8 +130,12 @@ class DriverMsgBoxBubbleAdapter : RecyclerView.Adapter<RecyclerView.ViewHolder>(
|
||||
override fun getItemViewType(position: Int): Int {
|
||||
if(data!![position].type == MsgBoxType.OPERATION){
|
||||
return operation
|
||||
}else{
|
||||
}else if(data!![position].type == MsgBoxType.REPORT){
|
||||
return report
|
||||
}else if(data!![position].type == MsgBoxType.NOTICE){
|
||||
return notice
|
||||
}else{
|
||||
return v2x
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,6 +152,20 @@ class DriverMsgBoxBubbleAdapter : RecyclerView.Adapter<RecyclerView.ViewHolder>(
|
||||
var tvBubbleOperationContent: TextView = itemView.findViewById(R.id.tvBubbleOperationContent)
|
||||
}
|
||||
|
||||
//Notice
|
||||
class BubbleNoticeHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
var ivNoticeImage: ImageView = itemView.findViewById(R.id.ivNoticeImage)
|
||||
var tvNoticeTitle: TextView = itemView.findViewById(R.id.tvNoticeTitle)
|
||||
var tvNoticeTime: TextView = itemView.findViewById(R.id.tvNoticeTime)
|
||||
var tvNoticeCheck: TextView = itemView.findViewById(R.id.tvNoticeCheck)
|
||||
var tvNoticeContent: TextView = itemView.findViewById(R.id.tvNoticeContent)
|
||||
}
|
||||
|
||||
//V2X
|
||||
class BubbleV2XHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
var ivV2XImage: ImageView = itemView.findViewById(R.id.ivV2XImage)
|
||||
var tvV2XTime: TextView = itemView.findViewById(R.id.tvV2XTime)
|
||||
var tvV2XContent: TextView = itemView.findViewById(R.id.tvV2XContent)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,15 +11,16 @@ import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
import com.mogo.eagle.core.data.msgbox.OperationMsg
|
||||
import com.mogo.eagle.core.data.msgbox.RecordBagMsg
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnum
|
||||
import com.mogo.eagle.core.data.msgbox.*
|
||||
import com.mogo.eagle.core.data.notice.NoticeNormalData
|
||||
import com.mogo.eagle.core.data.report.ReportEntity
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
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.transform.GlideRoundedCornersTransform
|
||||
import com.mogo.eagle.core.utilcode.util.ResourceUtils.getDrawable
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils.getHourMinFormat
|
||||
@@ -62,9 +63,12 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : RecyclerView.Ada
|
||||
}else if(viewType == operation){
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_box_operation,parent,false)
|
||||
return MsgBoxOperation(view)
|
||||
}else{
|
||||
}else if(viewType == notice){
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_box_notice,parent,false)
|
||||
return MsgBoxNotice(view)
|
||||
}else{
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_box_v2x,parent,false)
|
||||
return MsgBoxV2X(view)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,10 +78,11 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : RecyclerView.Ada
|
||||
data?.let {
|
||||
holder.tvBagReceiveTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvBagRecordTime.text = "时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
val recordBagMsg = (it[position].bean as RecordBagMsg)
|
||||
val msgBoxBean = it[position]
|
||||
// val recordBagMsg = (it[position].bean as RecordBagMsg)
|
||||
holder.tvRecordCheck.setOnClickListener {
|
||||
//打开被动录包弹窗
|
||||
CallerDevaToolsManager.onReceiveBadCaseRecord(recordBagMsg.key,recordBagMsg.fileName,activity)
|
||||
CallerDevaToolsManager.onReceiveBadCaseRecord(msgBoxBean,activity,false)
|
||||
}
|
||||
}
|
||||
}else if(holder is MsgBoxIpcReportHolder){
|
||||
@@ -111,6 +116,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : RecyclerView.Ada
|
||||
holder.tvReportReasonOpen.text = "原因:${reportEntity.msg}"
|
||||
holder.tvStatusSelect.setOnClickListener {
|
||||
if(holder.tvReportLevelNormal.isVisible){
|
||||
holder.tvStatusSelect.setCompoundDrawablesWithIntrinsicBounds(getDrawable(R.drawable.icon_msg_close),null,null,null)
|
||||
holder.ivReportImageNormal.visibility = View.GONE
|
||||
holder.tvReportLevelNormal.visibility = View.GONE
|
||||
holder.tvReportTimeNormal.visibility = View.GONE
|
||||
@@ -122,6 +128,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : RecyclerView.Ada
|
||||
holder.tvReportTypeOpen.visibility = View.VISIBLE
|
||||
holder.tvReportReasonOpen.visibility = View.VISIBLE
|
||||
}else{
|
||||
holder.tvStatusSelect.setCompoundDrawablesWithIntrinsicBounds(getDrawable(R.drawable.icon_msg_open),null,null,null)
|
||||
holder.ivReportImageNormal.visibility = View.VISIBLE
|
||||
holder.tvReportLevelNormal.visibility = View.VISIBLE
|
||||
holder.tvReportTimeNormal.visibility = View.VISIBLE
|
||||
@@ -143,6 +150,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : RecyclerView.Ada
|
||||
holder.tvOperationTime.text = TimeUtils.millis2String(operationMsg.timestamp,getHourMinFormat())
|
||||
holder.tvOperationStatusSelect.setOnClickListener {
|
||||
if(holder.ivOperationImageNormal.isVisible){
|
||||
holder.tvOperationStatusSelect.setCompoundDrawablesWithIntrinsicBounds(getDrawable(R.drawable.icon_msg_close),null,null,null)
|
||||
holder.ivOperationImageNormal.visibility = View.GONE
|
||||
holder.tvOperationTitleNormal.visibility = View.GONE
|
||||
holder.tvOperationContentNormal.visibility = View.GONE
|
||||
@@ -151,6 +159,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : RecyclerView.Ada
|
||||
holder.tvOperationTitleOpen.visibility = View.VISIBLE
|
||||
holder.tvOperationContentOpen.visibility = View.VISIBLE
|
||||
}else{
|
||||
holder.tvOperationStatusSelect.setCompoundDrawablesWithIntrinsicBounds(getDrawable(R.drawable.icon_msg_open),null,null,null)
|
||||
holder.ivOperationImageNormal.visibility = View.VISIBLE
|
||||
holder.tvOperationTitleNormal.visibility = View.VISIBLE
|
||||
holder.tvOperationContentNormal.visibility = View.VISIBLE
|
||||
@@ -166,6 +175,23 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : RecyclerView.Ada
|
||||
val noticeNormalData = it[position].bean as NoticeNormalData
|
||||
holder.tvNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvNoticeContent.text = noticeNormalData.content
|
||||
GlideApp.with(activity).load(noticeNormalData.imageUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivNoticeImage)
|
||||
holder.tvNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
CallerHmiManager.showNoticeNormalData(noticeNormalData)
|
||||
}
|
||||
}
|
||||
}else if(holder is MsgBoxV2X){
|
||||
data?.let {
|
||||
val v2XMsg = it[position].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)))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -221,10 +247,18 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : RecyclerView.Ada
|
||||
//Notice
|
||||
class MsgBoxNotice(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
var ivNoticeImage: ImageView = itemView.findViewById(R.id.ivNoticeImage)
|
||||
var tvNoticeTitle: TextView = itemView.findViewById(R.id.tvNoticeTitle)
|
||||
var tvNoticeTime: TextView = itemView.findViewById(R.id.tvNoticeTime)
|
||||
var tvNoticeCheck: TextView = itemView.findViewById(R.id.tvNoticeCheck)
|
||||
var tvNoticeContent: TextView = itemView.findViewById(R.id.tvNoticeContent)
|
||||
}
|
||||
|
||||
//V2X,OBU
|
||||
class MsgBoxV2X(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
var ivV2XImage: ImageView = itemView.findViewById(R.id.ivV2XImage)
|
||||
var tvV2XTime: TextView = itemView.findViewById(R.id.tvV2XTime)
|
||||
var tvV2XContent: TextView = itemView.findViewById(R.id.tvV2XContent)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.msgbox.adapter
|
||||
|
||||
import android.os.CountDownTimer
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
import com.mogo.eagle.core.data.msgbox.OperationMsg
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils.getHourMinFormat
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
* @description 乘客端消息盒子气泡视图RecyclerView适配器
|
||||
* @since: 2022/11/25
|
||||
*/
|
||||
class PassengerMsgBoxBubbleAdapter: RecyclerView.Adapter<RecyclerView.ViewHolder>() {
|
||||
|
||||
private var data: ArrayList<MsgBoxBean> ?= null
|
||||
|
||||
private val operation: Int = 1
|
||||
private val notice: Int = 2
|
||||
|
||||
var countDownTimer: CountDownTimer?=null
|
||||
|
||||
fun setData(data: ArrayList<MsgBoxBean>){
|
||||
this.data = data
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
|
||||
if(viewType == operation){
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_box_operation,parent,false)
|
||||
return BubbleOperationHolder(view)
|
||||
}else{
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_box_notice,parent,false)
|
||||
return BubbleNoticeHolder(view)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
|
||||
if(holder is BubbleOperationHolder){
|
||||
data?.let {
|
||||
val operationMsg = it[position].bean as OperationMsg
|
||||
holder.tvPassengerOperationTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerOperationContent.text = operationMsg.content
|
||||
}
|
||||
}else{
|
||||
data?.let {
|
||||
|
||||
}
|
||||
}
|
||||
val msgBoxBean: MsgBoxBean = data!![position]
|
||||
countDownTimer =object: CountDownTimer(CallerMsgBoxManager.getDismissTime(),1000){
|
||||
override fun onTick(p0: Long) {
|
||||
|
||||
}
|
||||
|
||||
override fun onFinish() {
|
||||
data?.remove(msgBoxBean)
|
||||
notifyDataSetChanged()
|
||||
// notifyItemRemoved(index)
|
||||
// notifyItemRangeChanged(index,recordTypeEntity.size-index)
|
||||
}
|
||||
|
||||
}
|
||||
countDownTimer?.start()
|
||||
}
|
||||
|
||||
override fun getItemCount() = data?.size ?: 0
|
||||
|
||||
override fun getItemViewType(position: Int): Int {
|
||||
if(data!![position].type == MsgBoxType.OPERATION){
|
||||
return operation
|
||||
}else{
|
||||
return notice
|
||||
}
|
||||
}
|
||||
|
||||
//官方公告
|
||||
class BubbleOperationHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
var ivPassengerOperationImage: ImageView = itemView.findViewById(R.id.ivPassengerOperationImage)
|
||||
var tvPassengerOperationTitle: TextView = itemView.findViewById(R.id.tvPassengerOperationTitle)
|
||||
var tvPassengerOperationContent: TextView = itemView.findViewById(R.id.tvPassengerOperationContent)
|
||||
var tvPassengerOperationCheck: TextView = itemView.findViewById(R.id.tvPassengerOperationCheck)
|
||||
var tvPassengerOperationTime: TextView = itemView.findViewById(R.id.tvPassengerOperationTime)
|
||||
}
|
||||
|
||||
//Notice
|
||||
class BubbleNoticeHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
var ivPassengerNoticeImage: ImageView = itemView.findViewById(R.id.ivPassengerNoticeImage)
|
||||
var ivPassengerNoticeTime: TextView = itemView.findViewById(R.id.ivPassengerNoticeTime)
|
||||
var ivPassengerNoticeContent: TextView = itemView.findViewById(R.id.ivPassengerNoticeContent)
|
||||
}
|
||||
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 269 B |
Binary file not shown.
|
After Width: | Height: | Size: 269 B |
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#29D8D8D8"/>
|
||||
<corners android:radius="22px"/>
|
||||
</shape>
|
||||
@@ -102,6 +102,8 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
|
||||
|
||||
<View
|
||||
android:id="@+id/viewDemoModeSwitch"
|
||||
android:layout_width="120dp"
|
||||
@@ -182,7 +184,7 @@
|
||||
|
||||
<!--消息盒子选择入口-->
|
||||
<CheckBox
|
||||
android:id="@+id/cbMsgBox"
|
||||
android:id="@+id/cbMsgBoxDriver"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="150dp"
|
||||
app:layout_constraintTop_toTopOf="@id/viewLimitingVelocity"
|
||||
@@ -190,6 +192,20 @@
|
||||
app:layout_constraintRight_toLeftOf="@id/viewLimitingVelocity"
|
||||
android:button="@null"
|
||||
android:background="@drawable/selector_msg_box"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/cbMsgBoxPassenger"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="150dp"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginStart="220dp"
|
||||
android:layout_marginBottom="30px"
|
||||
android:button="@null"
|
||||
android:background="@drawable/selector_msg_box"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
<View
|
||||
@@ -198,7 +214,7 @@
|
||||
android:layout_height="8dp"
|
||||
android:background="@drawable/version_upgrade_tips_background"
|
||||
android:translationZ="30dp"
|
||||
app:layout_constraintCircle="@id/cbMsgBox"
|
||||
app:layout_constraintCircle="@id/cbMsgBoxDriver"
|
||||
app:layout_constraintCircleAngle="40"
|
||||
app:layout_constraintCircleRadius="32dp"
|
||||
tools:ignore="MissingConstraints"
|
||||
@@ -209,8 +225,8 @@
|
||||
android:id="@+id/viewDriverMsgBoxList"
|
||||
android:layout_width="864px"
|
||||
android:layout_height="746px"
|
||||
app:layout_constraintTop_toBottomOf="@id/cbMsgBox"
|
||||
app:layout_constraintRight_toRightOf="@id/ivCameraIcon"
|
||||
app:layout_constraintTop_toBottomOf="@id/cbMsgBoxDriver"
|
||||
app:layout_constraintRight_toRightOf="@id/viewLimitingVelocity"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
@@ -218,8 +234,20 @@
|
||||
android:id="@+id/viewDriverMsgBoxBubble"
|
||||
android:layout_width="864px"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/cbMsgBox"
|
||||
app:layout_constraintRight_toRightOf="@id/ivCameraIcon"
|
||||
app:layout_constraintTop_toBottomOf="@id/cbMsgBoxDriver"
|
||||
app:layout_constraintRight_toRightOf="@id/viewLimitingVelocity"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.msgbox.PassengerMsgBoxBubbleView
|
||||
android:id="@+id/viewPassengerMsgBoxBubble"
|
||||
android:layout_width="864px"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/cbMsgBoxPassenger"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginBottom="40dp"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
<!--左右转向灯-->
|
||||
|
||||
@@ -68,12 +68,20 @@
|
||||
android:id="@+id/tvStatusSelect"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_margin="20px"
|
||||
android:text="折叠"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="24px"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginTop="25px"
|
||||
android:layout_marginEnd="25px"
|
||||
android:background="@drawable/bg_msg_status_select"
|
||||
android:drawableStart="@drawable/icon_msg_open"
|
||||
android:drawablePadding="10px"
|
||||
android:paddingStart="15px"
|
||||
android:paddingEnd="15px"
|
||||
android:paddingTop="5px"
|
||||
android:paddingBottom="5px"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
|
||||
@@ -14,39 +14,65 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivNoticeImage"
|
||||
android:layout_width="110px"
|
||||
android:layout_height="110px"
|
||||
android:layout_width="140px"
|
||||
android:layout_height="130px"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_margin="25px"
|
||||
android:layout_marginStart="15px"
|
||||
android:src="@drawable/icon_notice_default"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvNoticeTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="官方公告"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32px"
|
||||
app:layout_constraintTop_toTopOf="@id/ivNoticeImage"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivNoticeImage"
|
||||
android:layout_marginStart="15px"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvNoticeTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/ivNoticeImage"
|
||||
app:layout_constraintTop_toTopOf="@id/tvNoticeTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvNoticeTitle"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginEnd="25px"
|
||||
android:textColor="#80FFFFFF"
|
||||
android:textSize="24px"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvNoticeCheck"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginEnd="25px"
|
||||
android:layout_marginBottom="20px"
|
||||
android:text="查看"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="30px"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvNoticeContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivNoticeImage"
|
||||
app:layout_constraintRight_toRightOf="@id/tvNoticeTime"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvNoticeTime"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginStart="25px"
|
||||
android:layout_marginBottom="25px"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32px"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvNoticeTitle"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvNoticeCheck"
|
||||
app:layout_constraintTop_toTopOf="@id/tvNoticeCheck"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvNoticeCheck"
|
||||
android:gravity="start"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28px"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -63,6 +63,13 @@
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginTop="25px"
|
||||
android:layout_marginEnd="25px"
|
||||
android:background="@drawable/bg_msg_status_select"
|
||||
android:drawableStart="@drawable/icon_msg_open"
|
||||
android:drawablePadding="10px"
|
||||
android:paddingStart="15px"
|
||||
android:paddingEnd="15px"
|
||||
android:paddingTop="5px"
|
||||
android:paddingBottom="5px"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="804px"
|
||||
android:layout_height="160px"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#1B2966"
|
||||
app:roundLayoutRadius="24px"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="30px"
|
||||
android:layout_marginEnd="30px"
|
||||
android:layout_marginTop="5px"
|
||||
android:layout_marginBottom="5px">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivV2XImage"
|
||||
android:layout_width="110px"
|
||||
android:layout_height="110px"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_margin="25px"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvV2XTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/ivV2XImage"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginEnd="25px"
|
||||
android:textColor="#80FFFFFF"
|
||||
android:textSize="24px"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvV2XContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivV2XImage"
|
||||
app:layout_constraintRight_toRightOf="@id/tvV2XTime"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvV2XTime"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:layout_marginStart="25px"
|
||||
android:layout_marginBottom="25px"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32px"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="650px"
|
||||
android:layout_height="160px"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#465878"
|
||||
app:roundLayoutRadius="24px">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivPassengerNoticeImage"
|
||||
android:layout_width="120px"
|
||||
android:layout_height="120px"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginStart="20px"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/ivPassengerNoticeTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="26px"
|
||||
android:layout_marginEnd="20px"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/ivPassengerNoticeContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivPassengerNoticeImage"
|
||||
app:layout_constraintRight_toLeftOf="@id/ivPassengerNoticeTime"
|
||||
android:gravity="start"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="36px"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -0,0 +1,84 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="650px"
|
||||
android:layout_height="160px"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#465878"
|
||||
app:roundLayoutRadius="24px"
|
||||
android:layout_marginTop="10px"
|
||||
android:layout_marginBottom="10px"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivPassengerOperationImage"
|
||||
android:layout_width="160px"
|
||||
android:layout_height="160px"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:src="@drawable/icon_passenger_operation"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerOperationTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="官方公告"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="36px"
|
||||
android:layout_marginStart="20px"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivPassengerOperationImage"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvPassengerOperationContent"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerOperationContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="28px"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvPassengerOperationTitle"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvPassengerOperationTitle"
|
||||
app:layout_constraintRight_toRightOf="@id/tvPassengerOperationTime"
|
||||
android:gravity="start"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerOperationCheck"
|
||||
android:layout_width="140px"
|
||||
android:layout_height="160px"
|
||||
android:text="查 看"
|
||||
android:textColor="#FF84D4FF"
|
||||
android:textSize="28px"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="1px"
|
||||
android:layout_height="80px"
|
||||
android:background="#5E70A6"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvPassengerOperationCheck"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerOperationTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="26px"
|
||||
app:layout_constraintTop_toTopOf="@id/tvPassengerOperationTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvPassengerOperationTitle"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvPassengerOperationCheck"
|
||||
android:layout_marginEnd="20px"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/rvPassengerBubbleList"
|
||||
android:layout_width="650px"
|
||||
android:layout_height="wrap_content"
|
||||
>
|
||||
|
||||
</androidx.recyclerview.widget.RecyclerView>
|
||||
@@ -707,7 +707,9 @@ enum class EventTypeEnum(
|
||||
ALERT_CAR_TROUBLE_WARNING.poiType -> {
|
||||
R.drawable.icon_car_red
|
||||
}
|
||||
else -> 0
|
||||
else -> {
|
||||
R.drawable.icon_default
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.alibaba.android.arouter.facade.template.IProvider
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainLogParam
|
||||
import com.mogo.eagle.core.data.deva.scene.SceneModule
|
||||
import com.mogo.eagle.core.data.deva.scene.SceneTAG
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import record_cache.RecordPanelOuterClass
|
||||
|
||||
/**
|
||||
@@ -92,7 +93,7 @@ interface IDevaToolsProvider : IProvider {
|
||||
/**
|
||||
* 当工控机回调时调用
|
||||
*/
|
||||
fun onReceiveBadCaseRecord(recordKey: Long,fileName: String,activity: Activity)
|
||||
fun onReceiveBadCaseRecord(msgBoxBean: MsgBoxBean,activity: Activity,countdown: Boolean)
|
||||
|
||||
/**
|
||||
* 展示录包配置
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainLogParam
|
||||
import com.mogo.eagle.core.data.deva.scene.SceneModule
|
||||
import com.mogo.eagle.core.data.deva.scene.SceneTAG
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.function.api.devatools.IDevaToolsProvider
|
||||
import com.mogo.eagle.core.function.call.base.CallerBase
|
||||
import com.mogo.eagle.core.utilcode.mogo.*
|
||||
@@ -123,8 +124,8 @@ object CallerDevaToolsManager {
|
||||
/**
|
||||
* 收到工控机回调时触发
|
||||
*/
|
||||
fun onReceiveBadCaseRecord(recordKey: Long,fileName: String,activity: Activity) {
|
||||
devaToolsProviderApi?.onReceiveBadCaseRecord(recordKey, fileName, activity)
|
||||
fun onReceiveBadCaseRecord(msgBoxBean: MsgBoxBean,activity: Activity,countdown: Boolean) {
|
||||
devaToolsProviderApi?.onReceiveBadCaseRecord(msgBoxBean, activity,countdown)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
BIN
core/mogo-core-res/src/main/res/drawable-xhdpi/icon_default.png
Normal file
BIN
core/mogo-core-res/src/main/res/drawable-xhdpi/icon_default.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
Reference in New Issue
Block a user