Merge branch 'dev_arch_opt_3.0' into dev_robosweeper-d_app-module_221230_1.1.0
# Conflicts: # OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/view/SweeperLimitingVelocityView.kt # OCH/mogo-och-sweeper/src/main/java/com/mogo/och/sweeper/view/SweeperTrafficDataView.java # OCH/mogo-och-sweeper/src/main/res/layout/sweeper_base_fragment.xml
This commit is contained in:
@@ -69,11 +69,10 @@ dependencies {
|
||||
// debugImplementation rootProject.ext.dependencies.debugleakcanary
|
||||
// releaseImplementation rootProject.ext.dependencies.releaseleakcanary
|
||||
|
||||
implementation rootProject.ext.dependencies.mogoobu
|
||||
implementation rootProject.ext.dependencies.arouter
|
||||
kapt rootProject.ext.dependencies.aroutercompiler
|
||||
|
||||
implementation rootProject.ext.dependencies.mogoami
|
||||
|
||||
implementation rootProject.ext.dependencies.android_start_up
|
||||
implementation rootProject.ext.dependencies.cicle_indicator
|
||||
implementation rootProject.ext.dependencies.koomnative
|
||||
@@ -88,7 +87,6 @@ dependencies {
|
||||
api rootProject.ext.dependencies.mogo_core_data
|
||||
api rootProject.ext.dependencies.mogo_core_utils
|
||||
api rootProject.ext.dependencies.mogo_core_network
|
||||
api rootProject.ext.dependencies.mogo_core_function_obu_mogo
|
||||
api rootProject.ext.dependencies.mogo_core_function_map
|
||||
api rootProject.ext.dependencies.mogo_core_function_v2x
|
||||
api rootProject.ext.dependencies.mogo_core_function_devatools
|
||||
@@ -104,14 +102,12 @@ dependencies {
|
||||
api project(':core:mogo-core-res')
|
||||
api project(':core:mogo-core-data')
|
||||
api project(':core:mogo-core-utils')
|
||||
api project(':core:function-impl:mogo-core-function-obu-mogo')
|
||||
api project(':core:function-impl:mogo-core-function-map')
|
||||
api project(':core:function-impl:mogo-core-function-v2x')
|
||||
api project(':core:function-impl:mogo-core-function-devatools')
|
||||
api project(':core:function-impl:mogo-core-function-chat')
|
||||
api project(':core:function-impl:mogo-core-function-datacenter')
|
||||
api project(':core:function-impl:mogo-core-function-biz')
|
||||
|
||||
api project(':core:mogo-core-function-call')
|
||||
api project(':libraries:mogo-adas')
|
||||
api project(':libraries:map-usbcamera')
|
||||
|
||||
@@ -3,7 +3,11 @@ package com.mogo.eagle.core.function.hmi.receiver
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import android.view.View
|
||||
import com.mogo.eagle.core.data.enums.DataSourceType
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.LimitingVelocityView_TAG
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerViewLimitingVelocityListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.WaringConst
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
@@ -57,13 +61,13 @@ class V2XLimitingVelocityBroadcastReceiver : BroadcastReceiver() {
|
||||
* @param limitingVelocitySpeed 限速速度
|
||||
*/
|
||||
private fun dispatchShowWaring(limitingVelocitySpeed: Int) {
|
||||
CallerHmiManager.showLimitingVelocity(limitingVelocitySpeed, 1)
|
||||
CallerViewLimitingVelocityListenerManager.invokeOnLimitingVelocityChange(limitingVelocitySpeed,DataSourceType.MAP)
|
||||
}
|
||||
|
||||
/**
|
||||
* 关闭限速标志
|
||||
*/
|
||||
private fun dispatchCloseWaring() {
|
||||
CallerHmiManager.disableLimitingVelocity()
|
||||
CallerHmiViewControlListenerManager.invokeVisible(LimitingVelocityView_TAG, View.GONE)
|
||||
}
|
||||
}
|
||||
@@ -4,15 +4,17 @@ import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.util.Log
|
||||
import com.mogo.eagle.core.data.enums.DataSourceType
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.hmi.WaringConst
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
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.V2XMsg
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerViewLimitingVelocityListenerManager
|
||||
|
||||
/**
|
||||
* V2X 预警广播接收。用于跨应用,跨进程,内部也可以通过这种方式弹出预警提示框
|
||||
@@ -75,8 +77,8 @@ class V2XWarningBroadcastReceiver : BroadcastReceiver() {
|
||||
ttsContent: String?,
|
||||
tag: String?
|
||||
) {
|
||||
if (EventTypeEnum.TYPE_USECASE_ID_IVP.poiType == v2xType.toString()) {
|
||||
CallerHmiManager.showLimitingVelocity(1, 1)
|
||||
if (EventTypeEnumNew.TYPE_USECASE_ID_IVP_RED.poiType == v2xType.toString()) {
|
||||
CallerViewLimitingVelocityListenerManager.invokeOnLimitingVelocityChange(1,DataSourceType.MAP)
|
||||
}
|
||||
if (alertContent.isNullOrEmpty() || ttsContent.isNullOrEmpty()) {
|
||||
Log.d("MsgBox-V2XWarningBR", "alertContent或ttsContent为空!")
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Bundle
|
||||
import android.text.TextUtils
|
||||
import android.util.*
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.animation.AlphaAnimation
|
||||
@@ -24,38 +23,23 @@ import com.mogo.eagle.core.data.constants.MoGoFragmentPaths
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_RTS
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.V2I
|
||||
import com.mogo.eagle.core.data.dispatch.DispatchAdasAutoPilotLocReceiverBean
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnum
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
||||
import com.mogo.eagle.core.data.enums.WarningDirectionEnum
|
||||
import com.mogo.eagle.core.data.map.Infrastructure
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
|
||||
import com.mogo.eagle.core.data.msgbox.MsgBoxType
|
||||
import com.mogo.eagle.core.data.msgbox.RecordBagMsg
|
||||
import com.mogo.eagle.core.data.notice.NoticeNormalData
|
||||
import com.mogo.eagle.core.data.notice.NoticeTrafficStylePushData
|
||||
import com.mogo.eagle.core.data.report.ReportEntity
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotRecordListener
|
||||
import com.mogo.eagle.core.function.api.hmi.IMoGoHmiViewProxy
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.AutoPilotStatusView_TAG
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.CameraView_TAG
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.PerspectiveSwitchView_TAG
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.SpeedPanelView_TAG
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.ToolsView_TAG
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.TrafficLightView_TAG
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewLimitingVelocity
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewTrafficLight
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoHmiProvider
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager
|
||||
import com.mogo.eagle.core.function.call.biz.CallerFuncBizManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapDataCollectorManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerVisualAngleManager.Scene.Turning
|
||||
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.notification.WarningFloat
|
||||
import com.mogo.eagle.core.function.hmi.ui.bindingcar.ModifyBindingCarDialog
|
||||
@@ -67,10 +51,10 @@ import com.mogo.eagle.core.function.hmi.ui.notice.NoticeCheckDialog
|
||||
import com.mogo.eagle.core.function.hmi.ui.notice.traffic.NoticeTrafficDialog
|
||||
import com.mogo.eagle.core.function.hmi.ui.setting.CameraLiveView.Companion.cameraLiveView
|
||||
import com.mogo.eagle.core.function.hmi.ui.setting.IPCReportWindow
|
||||
import com.mogo.eagle.core.function.hmi.ui.setting.ToggleDebugView.Companion.toggleDebugView
|
||||
import com.mogo.eagle.core.function.hmi.ui.setting.ToolsView.Companion.toolsView
|
||||
import com.mogo.eagle.core.function.hmi.ui.tools.AdUpgradeDialog
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.*
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.DemoModeView
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.StatusBarView
|
||||
import com.mogo.eagle.core.function.main.DisplayEffectsHelper
|
||||
import com.mogo.eagle.core.utilcode.kotlin.safeCancel
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
@@ -78,17 +62,12 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast
|
||||
import com.mogo.eagle.core.utilcode.reminder.api.IReminder
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.TimeUtils.millis2String
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.zhjt.mogo_core_function_devatools.badcase.consts.BadCaseConfig
|
||||
import com.zhjt.service_biz.BizConfig
|
||||
import kotlinx.android.synthetic.main.fragment_hmi.*
|
||||
import kotlinx.coroutines.*
|
||||
import record_cache.RecordPanelOuterClass
|
||||
import java.util.concurrent.atomic.AtomicReference
|
||||
|
||||
/**
|
||||
@@ -100,7 +79,7 @@ import java.util.concurrent.atomic.AtomicReference
|
||||
class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
IMoGoHmiProvider,
|
||||
IMoGoHmiViewProxy,
|
||||
MoGoHmiContract.View{
|
||||
MoGoHmiContract.View {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "MoGoHmiFragment"
|
||||
@@ -110,9 +89,6 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
// todo 需要统一数据源 红绿灯 View代理
|
||||
private var mViewTrafficLight: IViewTrafficLight? = null
|
||||
|
||||
// todo 需要统一数据源 限速 View代理
|
||||
private var mViewLimitingVelocity: IViewLimitingVelocity? = null
|
||||
|
||||
private val lastSpeakJob by lazy { AtomicReference<Job>() }
|
||||
private var lastShowV2XJob: Job? = null
|
||||
|
||||
@@ -120,73 +96,16 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
|
||||
override fun initViews() {
|
||||
|
||||
//设置StatusBar初始状态
|
||||
CallerHmiViewControlListenerManager.updateStatusBarRightView(StatusBarView.TAG,FunctionBuildConfig.isDemoMode, "demoMode", DemoModeView(requireContext()))
|
||||
|
||||
//todo 新超,封装至消息盒子
|
||||
cbMsgBoxDriver.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (isChecked) {
|
||||
viewDriverMsgBoxList.visibility = View.VISIBLE
|
||||
viewDriverMsgBoxList.notifyData()
|
||||
viewDriverMsgBoxBubble.visibility = View.GONE
|
||||
viewDriverMsgBoxBubble.isShowData(false)
|
||||
CallerHmiManager.updateDriverMsgBoxTipView(false)
|
||||
} else {
|
||||
viewDriverMsgBoxList.visibility = View.GONE
|
||||
viewDriverMsgBoxBubble.visibility = View.VISIBLE
|
||||
viewDriverMsgBoxBubble.isShowData(true)
|
||||
}
|
||||
}
|
||||
|
||||
//todo 新超,封装至消息盒子
|
||||
cbMsgBoxPassenger.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (isChecked) {
|
||||
viewPassengerMsgBoxList.visibility = View.VISIBLE
|
||||
viewPassengerMsgBoxBubble.visibility = View.GONE
|
||||
viewPassengerMsgBoxBubble.isShowData(false)
|
||||
CallerHmiManager.updatePassengerMsgBoxTipView(false)
|
||||
} else {
|
||||
viewPassengerMsgBoxList.visibility = View.GONE
|
||||
viewPassengerMsgBoxBubble.visibility = View.VISIBLE
|
||||
viewPassengerMsgBoxBubble.isShowData(true)
|
||||
}
|
||||
}
|
||||
|
||||
//todo 加载端自己控制 --- 新超 本期我们设置到bus,taxi,sweep Fragment
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
// todo 新超
|
||||
override fun updateDriverMsgBoxTipView(show: Boolean) {
|
||||
if (show) {
|
||||
MsgBoxTipView.visibility = View.VISIBLE
|
||||
} else {
|
||||
MsgBoxTipView.visibility = View.GONE
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// todo 新超
|
||||
override fun updatePassengerMsgBoxTipView(show: Boolean) {
|
||||
if (show) {
|
||||
MsgBoxPTipView.visibility = View.VISIBLE
|
||||
} else {
|
||||
MsgBoxPTipView.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
//todo 确认使用方 taxi bus 乘客/司机
|
||||
setProxyLimitingSpeedView(viewLimitingVelocity)
|
||||
}
|
||||
|
||||
/** todo ----------------------------------------------**/
|
||||
@@ -197,13 +116,6 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
mViewTrafficLight = view
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置 限速 代理View
|
||||
*/
|
||||
override fun setProxyLimitingSpeedView(view: IViewLimitingVelocity) {
|
||||
mViewLimitingVelocity = view
|
||||
}
|
||||
|
||||
/**
|
||||
* ok
|
||||
* 工控机重启返回结果
|
||||
@@ -249,23 +161,38 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
}
|
||||
|
||||
override fun setStatusBarDarkOrLight(light: Boolean) {
|
||||
CallerHmiViewControlListenerManager.setStatusBarDarkOrLight(StatusBarView.TAG,light)
|
||||
CallerHmiViewControlListenerManager.setStatusBarDarkOrLight(StatusBarView.TAG, light)
|
||||
}
|
||||
|
||||
override fun updateStatusBarRightView(insert: Boolean, tag: String, viewGroup: ViewGroup) {
|
||||
CallerHmiViewControlListenerManager.updateStatusBarRightView(StatusBarView.TAG,insert, tag, viewGroup)
|
||||
CallerHmiViewControlListenerManager.updateStatusBarRightView(
|
||||
StatusBarView.TAG,
|
||||
insert,
|
||||
tag,
|
||||
viewGroup
|
||||
)
|
||||
}
|
||||
|
||||
override fun updateStatusBarLeftView(insert: Boolean, tag: String, viewGroup: ViewGroup) {
|
||||
CallerHmiViewControlListenerManager.updateStatusBarLeftView(StatusBarView.TAG,insert, tag, viewGroup)
|
||||
CallerHmiViewControlListenerManager.updateStatusBarLeftView(
|
||||
StatusBarView.TAG,
|
||||
insert,
|
||||
tag,
|
||||
viewGroup
|
||||
)
|
||||
}
|
||||
|
||||
override fun updateStatusBarDownloadView(insert: Boolean, tag: String, progress: Int) {
|
||||
CallerHmiViewControlListenerManager.updateStatusBarDownloadView(StatusBarView.TAG,insert, tag, progress)
|
||||
CallerHmiViewControlListenerManager.updateStatusBarDownloadView(
|
||||
StatusBarView.TAG,
|
||||
insert,
|
||||
tag,
|
||||
progress
|
||||
)
|
||||
}
|
||||
|
||||
override fun updateMfStatus(tag: String, status: Boolean) {
|
||||
CallerHmiViewControlListenerManager.updateMfStatus(StatusBarView.TAG,tag, status)
|
||||
CallerHmiViewControlListenerManager.updateMfStatus(StatusBarView.TAG, tag, status)
|
||||
}
|
||||
|
||||
override fun getLayoutId(): Int {
|
||||
@@ -284,30 +211,6 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
DisplayEffectsHelper.getInstance().display()
|
||||
}
|
||||
|
||||
override fun setTrafficLightVrVisibility(visibility: Int) {
|
||||
CallerHmiViewControlListenerManager.invokeVisible(TrafficLightView_TAG,visibility)
|
||||
}
|
||||
|
||||
override fun setToolsViewVisibility(visibility: Int) {
|
||||
CallerHmiViewControlListenerManager.invokeVisible(ToolsView_TAG,visibility)
|
||||
}
|
||||
|
||||
override fun setSpeedChartViewVisibility(visibility: Int) {
|
||||
CallerHmiViewControlListenerManager.invokeVisible(SpeedPanelView_TAG,visibility)
|
||||
}
|
||||
|
||||
override fun setAutopilotStatusViewVisibility(visibility: Int) {
|
||||
CallerHmiViewControlListenerManager.invokeVisible(AutoPilotStatusView_TAG,visibility)
|
||||
}
|
||||
|
||||
override fun setPerspectiveSwitchViewVisibility(visibility: Int) {
|
||||
CallerHmiViewControlListenerManager.invokeVisible(PerspectiveSwitchView_TAG,visibility)
|
||||
}
|
||||
|
||||
override fun setCameraViewVisibility(visibility: Int) {
|
||||
CallerHmiViewControlListenerManager.invokeVisible(CameraView_TAG, visibility)
|
||||
}
|
||||
|
||||
/** todo----------------------------------------------- **/
|
||||
/**
|
||||
* 不展示顶部弹窗,其它保留
|
||||
@@ -326,7 +229,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
playTts && !AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)
|
||||
activity?.let {
|
||||
val warningContent = alertContent
|
||||
?: EventTypeEnum.getWarningContent(v2xType)
|
||||
?: EventTypeEnumNew.getWarningContent(v2xType)
|
||||
|
||||
//占道施工预警
|
||||
if (v2xType == "10006" || v2xType == "100061") {
|
||||
@@ -364,7 +267,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
if (ttsContent != null && !TextUtils.isEmpty(ttsContent) && playTTS) {
|
||||
val last = lastSpeakJob.get()
|
||||
Log.d("CODE", "---- 0 ------: last: $last")
|
||||
if (last != null && !last.isCompleted) {
|
||||
if (last != null && !last.isCompleted) {
|
||||
Log.d("CODE", "---- 1 ------")
|
||||
return
|
||||
}
|
||||
@@ -465,40 +368,6 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
mViewTrafficLight?.changeCountdownTrafficLightNum(readNum, yellowNum, greenNum)
|
||||
}
|
||||
|
||||
/**
|
||||
* 控制展示限速标志及内容
|
||||
*/
|
||||
override fun showLimitingVelocity(limitingSpeed: Int, limitSpeedSource: Int) {
|
||||
// 控制 限速UI 展示
|
||||
if (HmiBuildConfig.isShowLimitingVelocityView) {
|
||||
if (limitingSpeed > 0) {
|
||||
mViewLimitingVelocity?.visibility = View.VISIBLE
|
||||
mViewLimitingVelocity?.updateLimitingSpeed(limitingSpeed, limitSpeedSource)
|
||||
tvLimitingSource?.visibility = View.VISIBLE
|
||||
if (limitSpeedSource == 1) {
|
||||
tvLimitingSource.text = "MAP"
|
||||
} else if (limitSpeedSource == 2) {
|
||||
tvLimitingSource.text = "RSU"
|
||||
}
|
||||
} else {
|
||||
mViewLimitingVelocity?.visibility = View.INVISIBLE
|
||||
mViewLimitingVelocity?.updateLimitingSpeed(0, limitSpeedSource)
|
||||
tvLimitingSource?.visibility = View.INVISIBLE
|
||||
}
|
||||
} else {
|
||||
disableLimitingVelocity()
|
||||
tvLimitingSource?.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 控制关闭限速标志及内容
|
||||
*/
|
||||
override fun disableLimitingVelocity() {
|
||||
mViewLimitingVelocity?.visibility = View.GONE
|
||||
mViewLimitingVelocity?.updateLimitingSpeed(0, 1)
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示指定方位上的红框预警
|
||||
* @param direction
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.msgbox
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
* @description 消息盒子司机端视图切换按钮
|
||||
* @since: 2023/1/31
|
||||
*/
|
||||
class DriverMsgBoxButtonView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
):ConstraintLayout(context, attrs, defStyleAttr) {
|
||||
|
||||
companion object {
|
||||
const val TAG = "DriverMsgBoxButtonView"
|
||||
}
|
||||
|
||||
init{
|
||||
LayoutInflater.from(context).inflate(R.layout.view_driver_msg_box_button, this, true)
|
||||
initView()
|
||||
}
|
||||
|
||||
private fun initView(){
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -171,13 +171,21 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
when (category) {
|
||||
MsgCategory.NOTICE -> {
|
||||
noticeList?.add(0,msgBoxList)
|
||||
if(MsgBoxConfig.getUserRecord() == 0){
|
||||
noticeList?.let { driverMsgBoxListAdapter?.setData(it) }
|
||||
}
|
||||
}
|
||||
MsgCategory.SYS_INFO -> {
|
||||
ipcReportList?.add(0,msgBoxList)
|
||||
if(MsgBoxConfig.getUserRecord() == 1){
|
||||
ipcReportList?.let { driverMsgBoxListAdapter?.setData(it) }
|
||||
}
|
||||
}
|
||||
MsgCategory.RECORD_BAG -> {
|
||||
badCaseList?.add(0,msgBoxList)
|
||||
badCaseList?.let { driverMsgBoxListAdapter?.setData(it) }
|
||||
if(MsgBoxConfig.getUserRecord() == 2){
|
||||
badCaseList?.let { driverMsgBoxListAdapter?.setData(it) }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.mogo.eagle.core.function.hmi.ui.msgbox
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
|
||||
/**
|
||||
* @author XuXinChao
|
||||
* @description 消息盒子乘客端视图切换按钮
|
||||
* @since: 2023/1/31
|
||||
*/
|
||||
class PassengerMsgBoxButtonView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
): ConstraintLayout(context, attrs, defStyleAttr) {
|
||||
|
||||
companion object {
|
||||
const val TAG = "PassengerMsgBoxButtonView"
|
||||
}
|
||||
|
||||
init{
|
||||
LayoutInflater.from(context).inflate(R.layout.view_passenger_msg_box_button, this, true)
|
||||
initView()
|
||||
}
|
||||
|
||||
private fun initView(){
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -8,7 +8,7 @@ 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.enums.DataSourceType
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
||||
import com.mogo.eagle.core.data.msgbox.*
|
||||
import com.mogo.eagle.core.data.report.ReportEntity
|
||||
@@ -34,6 +34,7 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
|
||||
private val notice: Int = 2
|
||||
private val v2x: Int = 3
|
||||
private val report: Int = 4
|
||||
private val summary: Int = 5
|
||||
|
||||
var countDownTimer: CountDownTimer?=null
|
||||
private var changeViewListener: ChangeViewListener?=null
|
||||
@@ -47,89 +48,105 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
|
||||
if(viewType == operation){
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_operation,parent,false)
|
||||
return BubbleOperationHolder(view)
|
||||
}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_bubble_notice,parent,false)
|
||||
return BubbleNoticeHolder(view)
|
||||
}else{
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_v2x,parent,false)
|
||||
return BubbleV2XHolder(view)
|
||||
when (viewType) {
|
||||
operation -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_operation,parent,false)
|
||||
return BubbleOperationHolder(view)
|
||||
}
|
||||
report -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_report,parent,false)
|
||||
return BubbleReportHolder(view)
|
||||
}
|
||||
notice -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_notice,parent,false)
|
||||
return BubbleNoticeHolder(view)
|
||||
}
|
||||
summary -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_summary,parent,false)
|
||||
return BubbleSummaryHolder(view)
|
||||
}
|
||||
else -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_bubble_v2x,parent,false)
|
||||
return BubbleV2XHolder(view)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
|
||||
if(holder is BubbleOperationHolder){
|
||||
data?.let {
|
||||
val operationMsg = it[position].bean as OperationMsg
|
||||
holder.tvBubbleOperationTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvBubbleOperationContent.text = operationMsg.content
|
||||
}
|
||||
}else if(holder is BubbleReportHolder){
|
||||
data?.let {
|
||||
val reportEntity = it[position].bean as ReportEntity
|
||||
holder.tvBubbleReportTime.text = "时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
holder.tvBubbleReceiveTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
var resultStr = "类型:"
|
||||
for (result in reportEntity.resultList){
|
||||
resultStr = "${resultStr}${CallerAutoPilotManager.getReportResultDesc(result)}"
|
||||
when (holder) {
|
||||
is BubbleOperationHolder -> {
|
||||
data?.let {
|
||||
val operationMsg = it[position].bean as OperationMsg
|
||||
holder.tvBubbleOperationTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvBubbleOperationContent.text = operationMsg.content
|
||||
}
|
||||
holder.tvBubbleReportType.text = resultStr
|
||||
}
|
||||
}else if(holder is BubbleNoticeHolder){
|
||||
data?.let {
|
||||
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())
|
||||
holder.tvNoticeContent.text = noticeNormalData?.content
|
||||
GlideApp.with(activity).load(noticeNormalData?.imageUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivNoticeImage)
|
||||
holder.tvNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
if (noticeNormalData != null) {
|
||||
CallerHmiManager.showNoticeNormalData(noticeNormalData)
|
||||
}
|
||||
is BubbleReportHolder -> {
|
||||
data?.let {
|
||||
val reportEntity = it[position].bean as ReportEntity
|
||||
holder.tvBubbleReportTime.text = "时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
holder.tvBubbleReceiveTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
var resultStr = "类型:"
|
||||
for (result in reportEntity.resultList){
|
||||
resultStr = "${resultStr}${CallerAutoPilotManager.getReportResultDesc(result)}"
|
||||
}
|
||||
}else if(noticeFrCloudMsg.type == 1){
|
||||
val noticeTrafficStylePushData = noticeFrCloudMsg.trafficPushData
|
||||
holder.tvNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvNoticeContent.text = noticeTrafficStylePushData?.content
|
||||
GlideApp.with(activity).load(noticeTrafficStylePushData?.poiImgUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivNoticeImage)
|
||||
holder.tvNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
if (noticeTrafficStylePushData != null) {
|
||||
CallerHmiManager.showTrafficBanner(noticeTrafficStylePushData)
|
||||
holder.tvBubbleReportType.text = resultStr
|
||||
}
|
||||
}
|
||||
is BubbleNoticeHolder -> {
|
||||
data?.let {
|
||||
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())
|
||||
holder.tvNoticeContent.text = noticeNormalData?.content
|
||||
GlideApp.with(activity).load(noticeNormalData?.imageUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivNoticeImage)
|
||||
holder.tvNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
if (noticeNormalData != null) {
|
||||
CallerHmiManager.showNoticeNormalData(noticeNormalData)
|
||||
}
|
||||
}
|
||||
}else if(noticeFrCloudMsg.type == 1){
|
||||
val noticeTrafficStylePushData = noticeFrCloudMsg.trafficPushData
|
||||
holder.tvNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvNoticeContent.text = noticeTrafficStylePushData?.content
|
||||
GlideApp.with(activity).load(noticeTrafficStylePushData?.poiImgUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivNoticeImage)
|
||||
holder.tvNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
if (noticeTrafficStylePushData != null) {
|
||||
CallerHmiManager.showTrafficBanner(noticeTrafficStylePushData)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}else if(holder is BubbleV2XHolder){
|
||||
data?.let {
|
||||
val msgBoxBean = it[position]
|
||||
val v2XMsg = msgBoxBean.bean as V2XMsg
|
||||
holder.tvV2XTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvV2XContent.text = v2XMsg.content
|
||||
if(msgBoxBean.type == MsgBoxType.OBU){
|
||||
is BubbleV2XHolder -> {
|
||||
data?.let {
|
||||
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(
|
||||
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type)))
|
||||
}else{
|
||||
holder.ivV2XImage.setImageDrawable(activity.resources.getDrawable(
|
||||
EventTypeEnum.getUpdateIconRes(v2XMsg.type)))
|
||||
}
|
||||
}
|
||||
is BubbleSummaryHolder -> {
|
||||
data?.let {
|
||||
val summaryMsg = it[position].bean as V2XMsg
|
||||
holder.tvSummaryTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvSummaryContent.text = summaryMsg.content
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -156,14 +173,16 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
|
||||
override fun getItemCount() = data?.size ?: 0
|
||||
|
||||
override fun getItemViewType(position: Int): Int {
|
||||
if(data!![position].type == MsgBoxType.OPERATION){
|
||||
return operation
|
||||
return if(data!![position].type == MsgBoxType.OPERATION){
|
||||
operation
|
||||
}else if(data!![position].type == MsgBoxType.REPORT){
|
||||
return report
|
||||
report
|
||||
}else if(data!![position].type == MsgBoxType.NOTICE){
|
||||
return notice
|
||||
}else{
|
||||
return v2x
|
||||
notice
|
||||
}else if(data!![position].type == MsgBoxType.V2X && data!![position].sourceType == DataSourceType.SUMMARY){
|
||||
summary
|
||||
} else{
|
||||
v2x
|
||||
}
|
||||
}
|
||||
|
||||
@@ -196,6 +215,12 @@ class DriverMsgBoxBubbleAdapter(private val activity: Activity) : RecyclerView.A
|
||||
var tvV2XContent: TextView = itemView.findViewById(R.id.tvV2XContent)
|
||||
}
|
||||
|
||||
//汇总消息
|
||||
class BubbleSummaryHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
var tvSummaryContent: TextView = itemView.findViewById(R.id.tvSummaryContent)
|
||||
var tvSummaryTime: TextView = itemView.findViewById(R.id.tvSummaryTime)
|
||||
}
|
||||
|
||||
fun setChangeListener(listener: ChangeViewListener){
|
||||
changeViewListener = listener
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import android.widget.ImageView
|
||||
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.DataSourceType
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
||||
import com.mogo.eagle.core.data.msgbox.*
|
||||
import com.mogo.eagle.core.data.report.ReportEntity
|
||||
@@ -28,198 +28,263 @@ import com.mogo.eagle.core.utilcode.util.TimeUtils.getHourMinFormat
|
||||
* @description 司机端消息盒子列表视图RecyclerView适配器
|
||||
* @since: 2022/11/25
|
||||
*/
|
||||
class DriverMsgBoxListAdapter(private val activity: Activity) : RecyclerView.Adapter<RecyclerView.ViewHolder>(){
|
||||
class DriverMsgBoxListAdapter(private val activity: Activity) :
|
||||
RecyclerView.Adapter<RecyclerView.ViewHolder>() {
|
||||
|
||||
private var data: List<MsgBoxBean> ?= null
|
||||
private var data: List<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 summary: Int = 8
|
||||
|
||||
//Error
|
||||
val RESULT_AUTOPILOT_DISABLE = "RESULT_AUTOPILOT_DISABLE"
|
||||
val RESULT_AUTOPILOT_SYSTEM_UNSTARTED = "RESULT_AUTOPILOT_SYSTEM_UNSTARTED"
|
||||
val RESULT_REMOTEPILOT_DISABLE = "RESULT_REMOTEPILOT_DISABLE"
|
||||
|
||||
fun setData(data: List<MsgBoxBean>){
|
||||
fun setData(data: List<MsgBoxBean>) {
|
||||
this.data = data
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
|
||||
if(viewType == record){
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_bad_case,parent,false)
|
||||
return BadCaseHolder(view)
|
||||
}else if(viewType == report){
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_box_ipc_report,parent,false)
|
||||
return MsgBoxIpcReportHolder(view)
|
||||
}else if(viewType == operation){
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_msg_box_operation,parent,false)
|
||||
return MsgBoxOperation(view)
|
||||
}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)
|
||||
when (viewType) {
|
||||
record -> {
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_bad_case, parent, false)
|
||||
return BadCaseHolder(view)
|
||||
}
|
||||
report -> {
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_msg_box_ipc_report, parent, false)
|
||||
return MsgBoxIpcReportHolder(view)
|
||||
}
|
||||
operation -> {
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_msg_box_operation, parent, false)
|
||||
return MsgBoxOperation(view)
|
||||
}
|
||||
notice -> {
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_msg_box_notice, parent, false)
|
||||
return MsgBoxNotice(view)
|
||||
}
|
||||
summary -> {
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_msg_box_summary, parent, false)
|
||||
return MsgBoxSummary(view)
|
||||
}
|
||||
else -> {
|
||||
val view = LayoutInflater.from(parent.context)
|
||||
.inflate(R.layout.item_msg_box_v2x, parent, false)
|
||||
return MsgBoxV2X(view)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
|
||||
if(holder is BadCaseHolder){
|
||||
data?.let {
|
||||
holder.tvBagReceiveTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvBagRecordTime.text = "时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
val msgBoxBean = it[position]
|
||||
holder.tvRecordCheck.setOnClickListener {
|
||||
//打开被动录包弹窗
|
||||
CallerDevaToolsManager.onReceiveBadCaseRecord(msgBoxBean,activity,false)
|
||||
}
|
||||
}
|
||||
}else if(holder is MsgBoxIpcReportHolder){
|
||||
data?.let { it ->
|
||||
holder.tvReportTimeNormal.text = "时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
holder.tvReportTimeOpen.text = "时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
val reportEntity = (it[position].bean as ReportEntity)
|
||||
if(reportEntity.resultList.contains(RESULT_AUTOPILOT_DISABLE)
|
||||
|| reportEntity.resultList.contains(RESULT_AUTOPILOT_SYSTEM_UNSTARTED)
|
||||
|| reportEntity.resultList.contains(RESULT_REMOTEPILOT_DISABLE)){
|
||||
//Error
|
||||
holder.ivReportImageNormal.setImageDrawable(getDrawable(R.drawable.icon_report_error_normal))
|
||||
holder.ivReportImageOpen.setImageDrawable(getDrawable(R.drawable.icon_report_error_open))
|
||||
holder.tvReportLevelNormal.text = "Error"
|
||||
holder.tvReportLevelOpen.text = "Error"
|
||||
}else{
|
||||
//Warning
|
||||
holder.ivReportImageNormal.setImageDrawable(getDrawable(R.drawable.icon_report_warning_normal))
|
||||
holder.ivReportImageOpen.setImageDrawable(getDrawable(R.drawable.icon_report_warning_open))
|
||||
holder.tvReportLevelNormal.text = "Warning"
|
||||
holder.tvReportLevelOpen.text = "Warning"
|
||||
}
|
||||
holder.tvReportTimeNormal.text = "时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
holder.tvReportTimeOpen.text = "时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
holder.tvReportTime.text =TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
var resultStr = "类型:"
|
||||
for (result in reportEntity.resultList){
|
||||
resultStr = "${resultStr}${CallerAutoPilotManager.getReportResultDesc(result)}"
|
||||
}
|
||||
holder.tvReportTypeNormal.text = resultStr
|
||||
holder.tvReportTypeOpen.text = resultStr
|
||||
holder.tvReportReasonOpen.text = "原因:${reportEntity.msg}"
|
||||
var actionStr = ""
|
||||
for (action in reportEntity.actionsList){
|
||||
actionStr = "${actionStr}${CallerAutoPilotManager.getReportActionDesc(action)}"
|
||||
}
|
||||
holder.tvReportActionOpen.text = "建议操作:$actionStr"
|
||||
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
|
||||
holder.tvReportTypeNormal.visibility = View.GONE
|
||||
|
||||
holder.ivReportImageOpen.visibility = View.VISIBLE
|
||||
holder.tvReportLevelOpen.visibility = View.VISIBLE
|
||||
holder.tvReportTimeOpen.visibility = View.VISIBLE
|
||||
holder.tvReportTypeOpen.visibility = View.VISIBLE
|
||||
holder.tvReportReasonOpen.visibility = View.VISIBLE
|
||||
holder.tvReportActionOpen.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
|
||||
holder.tvReportTypeNormal.visibility = View.VISIBLE
|
||||
|
||||
holder.ivReportImageOpen.visibility = View.GONE
|
||||
holder.tvReportLevelOpen.visibility = View.GONE
|
||||
holder.tvReportTimeOpen.visibility = View.GONE
|
||||
holder.tvReportTypeOpen.visibility = View.GONE
|
||||
holder.tvReportReasonOpen.visibility = View.GONE
|
||||
holder.tvReportActionOpen.visibility = View.GONE
|
||||
when (holder) {
|
||||
is BadCaseHolder -> {
|
||||
data?.let {
|
||||
holder.tvBagReceiveTime.text =
|
||||
TimeUtils.millis2String(it[position].timestamp, getHourMinFormat())
|
||||
holder.tvBagRecordTime.text =
|
||||
"时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
val msgBoxBean = it[position]
|
||||
holder.tvRecordCheck.setOnClickListener {
|
||||
//打开被动录包弹窗
|
||||
CallerDevaToolsManager.onReceiveBadCaseRecord(msgBoxBean, activity, false)
|
||||
}
|
||||
}
|
||||
}
|
||||
}else if(holder is MsgBoxOperation){
|
||||
data?.let {
|
||||
val operationMsg = it[position].bean as OperationMsg
|
||||
holder.tvOperationContentNormal.text = operationMsg.content
|
||||
holder.tvOperationContentOpen.text = operationMsg.content
|
||||
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
|
||||
is MsgBoxIpcReportHolder -> {
|
||||
data?.let { it ->
|
||||
holder.tvReportTimeNormal.text =
|
||||
"时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
holder.tvReportTimeOpen.text =
|
||||
"时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
val reportEntity = (it[position].bean as ReportEntity)
|
||||
if (reportEntity.resultList.contains(RESULT_AUTOPILOT_DISABLE)
|
||||
|| reportEntity.resultList.contains(RESULT_AUTOPILOT_SYSTEM_UNSTARTED)
|
||||
|| reportEntity.resultList.contains(RESULT_REMOTEPILOT_DISABLE)
|
||||
) {
|
||||
//Error
|
||||
holder.ivReportImageNormal.setImageDrawable(getDrawable(R.drawable.icon_report_error_normal))
|
||||
holder.ivReportImageOpen.setImageDrawable(getDrawable(R.drawable.icon_report_error_open))
|
||||
holder.tvReportLevelNormal.text = "Error"
|
||||
holder.tvReportLevelOpen.text = "Error"
|
||||
} else {
|
||||
//Warning
|
||||
holder.ivReportImageNormal.setImageDrawable(getDrawable(R.drawable.icon_report_warning_normal))
|
||||
holder.ivReportImageOpen.setImageDrawable(getDrawable(R.drawable.icon_report_warning_open))
|
||||
holder.tvReportLevelNormal.text = "Warning"
|
||||
holder.tvReportLevelOpen.text = "Warning"
|
||||
}
|
||||
holder.tvReportTimeNormal.text =
|
||||
"时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
holder.tvReportTimeOpen.text =
|
||||
"时间:${TimeUtils.millis2String(it[position].timestamp)}"
|
||||
holder.tvReportTime.text =
|
||||
TimeUtils.millis2String(it[position].timestamp, getHourMinFormat())
|
||||
var resultStr = "类型:"
|
||||
for (result in reportEntity.resultList) {
|
||||
resultStr =
|
||||
"${resultStr}${CallerAutoPilotManager.getReportResultDesc(result)}"
|
||||
}
|
||||
holder.tvReportTypeNormal.text = resultStr
|
||||
holder.tvReportTypeOpen.text = resultStr
|
||||
holder.tvReportReasonOpen.text = "原因:${reportEntity.msg}"
|
||||
var actionStr = ""
|
||||
for (action in reportEntity.actionsList) {
|
||||
actionStr =
|
||||
"${actionStr}${CallerAutoPilotManager.getReportActionDesc(action)}"
|
||||
}
|
||||
holder.tvReportActionOpen.text = "建议操作:$actionStr"
|
||||
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
|
||||
holder.tvReportTypeNormal.visibility = View.GONE
|
||||
|
||||
holder.ivOperationImageOpen.visibility = View.VISIBLE
|
||||
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
|
||||
holder.ivReportImageOpen.visibility = View.VISIBLE
|
||||
holder.tvReportLevelOpen.visibility = View.VISIBLE
|
||||
holder.tvReportTimeOpen.visibility = View.VISIBLE
|
||||
holder.tvReportTypeOpen.visibility = View.VISIBLE
|
||||
holder.tvReportReasonOpen.visibility = View.VISIBLE
|
||||
holder.tvReportActionOpen.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
|
||||
holder.tvReportTypeNormal.visibility = View.VISIBLE
|
||||
|
||||
holder.ivOperationImageOpen.visibility = View.GONE
|
||||
holder.tvOperationTitleOpen.visibility = View.GONE
|
||||
holder.tvOperationContentOpen.visibility = View.GONE
|
||||
holder.ivReportImageOpen.visibility = View.GONE
|
||||
holder.tvReportLevelOpen.visibility = View.GONE
|
||||
holder.tvReportTimeOpen.visibility = View.GONE
|
||||
holder.tvReportTypeOpen.visibility = View.GONE
|
||||
holder.tvReportReasonOpen.visibility = View.GONE
|
||||
holder.tvReportActionOpen.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}else if(holder is MsgBoxNotice){
|
||||
data?.let {
|
||||
val noticeFrCloudMsg = it[position].bean as NoticeFrCloudMsg
|
||||
if(noticeFrCloudMsg.type == 0){
|
||||
val noticeNormalData = noticeFrCloudMsg.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 {
|
||||
//云公告
|
||||
noticeNormalData?.let { it1 -> CallerHmiManager.showNoticeNormalData(it1) }
|
||||
}
|
||||
}else if(noticeFrCloudMsg.type == 1){
|
||||
val noticeTrafficStylePushData = noticeFrCloudMsg.trafficPushData
|
||||
holder.tvNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvNoticeContent.text = noticeTrafficStylePushData?.content
|
||||
GlideApp.with(activity).load(noticeTrafficStylePushData?.poiImgUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivNoticeImage)
|
||||
holder.tvNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
noticeTrafficStylePushData?.let { it1 -> CallerHmiManager.showTrafficBanner(it1) }
|
||||
is MsgBoxOperation -> {
|
||||
data?.let {
|
||||
val operationMsg = it[position].bean as OperationMsg
|
||||
holder.tvOperationContentNormal.text = operationMsg.content
|
||||
holder.tvOperationContentOpen.text = operationMsg.content
|
||||
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
|
||||
|
||||
holder.ivOperationImageOpen.visibility = View.VISIBLE
|
||||
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
|
||||
|
||||
holder.ivOperationImageOpen.visibility = View.GONE
|
||||
holder.tvOperationTitleOpen.visibility = View.GONE
|
||||
holder.tvOperationContentOpen.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}else if(holder is MsgBoxV2X){
|
||||
data?.let {
|
||||
val msgBoxBean = it[position]
|
||||
val v2XMsg = msgBoxBean.bean as V2XMsg
|
||||
holder.tvV2XTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvV2XContent.text = v2XMsg.content
|
||||
if(msgBoxBean.type == MsgBoxType.OBU){
|
||||
is MsgBoxNotice -> {
|
||||
data?.let {
|
||||
val noticeFrCloudMsg = it[position].bean as NoticeFrCloudMsg
|
||||
if (noticeFrCloudMsg.type == 0) {
|
||||
val noticeNormalData = noticeFrCloudMsg.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 {
|
||||
//云公告
|
||||
noticeNormalData?.let { it1 -> CallerHmiManager.showNoticeNormalData(it1) }
|
||||
}
|
||||
} else if (noticeFrCloudMsg.type == 1) {
|
||||
val noticeTrafficStylePushData = noticeFrCloudMsg.trafficPushData
|
||||
holder.tvNoticeTime.text =
|
||||
TimeUtils.millis2String(it[position].timestamp, getHourMinFormat())
|
||||
holder.tvNoticeContent.text = noticeTrafficStylePushData?.content
|
||||
GlideApp.with(activity).load(noticeTrafficStylePushData?.poiImgUrl)
|
||||
.optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivNoticeImage)
|
||||
holder.tvNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
noticeTrafficStylePushData?.let { it1 ->
|
||||
CallerHmiManager.showTrafficBanner(
|
||||
it1
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
is MsgBoxV2X -> {
|
||||
data?.let {
|
||||
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(
|
||||
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type)))
|
||||
}else{
|
||||
holder.ivV2XImage.setImageDrawable(activity.resources.getDrawable(
|
||||
EventTypeEnum.getUpdateIconRes(v2XMsg.type)))
|
||||
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type))
|
||||
)
|
||||
}
|
||||
}
|
||||
is MsgBoxSummary -> {
|
||||
data?.let {
|
||||
val summaryMsg = it[position].bean as V2XMsg
|
||||
holder.tvSummaryTime.text =
|
||||
TimeUtils.millis2String(it[position].timestamp, getHourMinFormat())
|
||||
holder.tvSummaryContent.text = summaryMsg.content
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -229,26 +294,30 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : RecyclerView.Ada
|
||||
|
||||
|
||||
override fun getItemViewType(position: Int): Int {
|
||||
return when(data!![position].type){
|
||||
MsgBoxType.OPERATION -> operation
|
||||
MsgBoxType.NOTICE -> notice
|
||||
MsgBoxType.V2X -> v2x
|
||||
MsgBoxType.OBU -> obu
|
||||
MsgBoxType.REPORT -> report
|
||||
MsgBoxType.RECORD -> record
|
||||
MsgBoxType.TRAFFIC -> traffic
|
||||
}
|
||||
return if (data!![position].type == MsgBoxType.OPERATION) {
|
||||
operation
|
||||
} else if (data!![position].type == MsgBoxType.NOTICE) {
|
||||
notice
|
||||
} else if (data!![position].type == MsgBoxType.V2X && data!![position].sourceType == DataSourceType.SUMMARY) {
|
||||
summary
|
||||
} else if (data!![position].type == MsgBoxType.REPORT) {
|
||||
report
|
||||
} else if (data!![position].type == MsgBoxType.RECORD) {
|
||||
record
|
||||
} else {
|
||||
v2x
|
||||
}
|
||||
}
|
||||
|
||||
//录包实体
|
||||
class BadCaseHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
var tvBagRecordTime: TextView= itemView.findViewById(R.id.tvBagRecordTime)
|
||||
class BadCaseHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||
var tvBagRecordTime: TextView = itemView.findViewById(R.id.tvBagRecordTime)
|
||||
var tvBagReceiveTime: TextView = itemView.findViewById(R.id.tvBagReceiveTime)
|
||||
var tvRecordCheck: TextView = itemView.findViewById(R.id.tvRecordCheck)
|
||||
}
|
||||
|
||||
//车辆系统信息
|
||||
class MsgBoxIpcReportHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
class MsgBoxIpcReportHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||
var ivReportImageNormal: ImageView = itemView.findViewById(R.id.ivReportImageNormal)
|
||||
var tvReportLevelNormal: TextView = itemView.findViewById(R.id.tvReportLevelNormal)
|
||||
var tvReportTimeNormal: TextView = itemView.findViewById(R.id.tvReportTimeNormal)
|
||||
@@ -264,10 +333,11 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : RecyclerView.Ada
|
||||
}
|
||||
|
||||
//运营平台
|
||||
class MsgBoxOperation(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
class MsgBoxOperation(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||
var ivOperationImageNormal: ImageView = itemView.findViewById(R.id.ivOperationImageNormal)
|
||||
var tvOperationTitleNormal: TextView = itemView.findViewById(R.id.tvOperationTitleNormal)
|
||||
var tvOperationContentNormal: TextView = itemView.findViewById(R.id.tvOperationContentNormal)
|
||||
var tvOperationContentNormal: TextView =
|
||||
itemView.findViewById(R.id.tvOperationContentNormal)
|
||||
var tvOperationStatusSelect: TextView = itemView.findViewById(R.id.tvOperationStatusSelect)
|
||||
var tvOperationTime: TextView = itemView.findViewById(R.id.tvOperationTime)
|
||||
var ivOperationImageOpen: ImageView = itemView.findViewById(R.id.ivOperationImageOpen)
|
||||
@@ -276,7 +346,7 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : RecyclerView.Ada
|
||||
}
|
||||
|
||||
//Notice
|
||||
class MsgBoxNotice(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
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)
|
||||
@@ -285,11 +355,17 @@ class DriverMsgBoxListAdapter(private val activity: Activity) : RecyclerView.Ada
|
||||
}
|
||||
|
||||
//V2X,OBU
|
||||
class MsgBoxV2X(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
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)
|
||||
}
|
||||
|
||||
//汇总消息
|
||||
class MsgBoxSummary(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||
var tvSummaryContent: TextView = itemView.findViewById(R.id.tvSummaryContent)
|
||||
var tvSummaryTime: TextView = itemView.findViewById(R.id.tvSummaryTime)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -8,15 +8,12 @@ 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.enums.DataSourceType
|
||||
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
|
||||
import com.mogo.eagle.core.data.msgbox.V2XMsg
|
||||
import com.mogo.eagle.core.data.msgbox.*
|
||||
import com.mogo.eagle.core.utilcode.mogo.glide.GlideApp
|
||||
import com.mogo.eagle.core.data.notice.NoticeNormalData
|
||||
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.utilcode.mogo.glide.transform.GlideRoundedCornersTransform
|
||||
@@ -34,6 +31,7 @@ class PassengerMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView
|
||||
|
||||
private val notice: Int = 1
|
||||
private val v2x: Int = 2
|
||||
private val summary: Int = 3
|
||||
|
||||
var countDownTimer: CountDownTimer?=null
|
||||
|
||||
@@ -46,65 +44,83 @@ class PassengerMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
|
||||
if(viewType == notice){
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_box_notice,parent,false)
|
||||
return BubbleNoticeHolder(view)
|
||||
}else{
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_box_v2x,parent,false)
|
||||
return BubbleV2XHolder(view)
|
||||
return when (viewType) {
|
||||
notice -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_box_notice,parent,false)
|
||||
BubbleNoticeHolder(view)
|
||||
}
|
||||
summary -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_box_summary,parent,false)
|
||||
BubbleSummaryHolder(view)
|
||||
}
|
||||
else -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_box_v2x,parent,false)
|
||||
BubbleV2XHolder(view)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
|
||||
if(holder is BubbleNoticeHolder){
|
||||
data?.let {
|
||||
val noticeFrCloudMsg = it[position].bean as NoticeFrCloudMsg
|
||||
if(noticeFrCloudMsg.type == 0){
|
||||
val noticeNormalData = noticeFrCloudMsg.noticeNormalData
|
||||
holder.tvPassengerNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerNoticeContent.text = noticeNormalData?.content
|
||||
GlideApp.with(activity).load(noticeNormalData?.imageUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivPassengerNoticeImage)
|
||||
holder.tvPassengerNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
noticeNormalData?.let { it1 -> CallerHmiManager.showNoticeNormalData(it1) }
|
||||
when (holder) {
|
||||
is BubbleNoticeHolder -> {
|
||||
data?.let {
|
||||
val noticeFrCloudMsg = it[position].bean as NoticeFrCloudMsg
|
||||
if(noticeFrCloudMsg.type == 0){
|
||||
val noticeNormalData = noticeFrCloudMsg.noticeNormalData
|
||||
holder.tvPassengerNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerNoticeContent.text = noticeNormalData?.content
|
||||
GlideApp.with(activity).load(noticeNormalData?.imageUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivPassengerNoticeImage)
|
||||
holder.tvPassengerNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
noticeNormalData?.let { it1 -> CallerHmiManager.showNoticeNormalData(it1) }
|
||||
}
|
||||
}else if(noticeFrCloudMsg.type == 1){
|
||||
val noticeTrafficStylePushData = noticeFrCloudMsg.trafficPushData
|
||||
holder.tvPassengerNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerNoticeContent.text = noticeTrafficStylePushData?.content
|
||||
GlideApp.with(activity).load(noticeTrafficStylePushData?.poiImgUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivPassengerNoticeImage)
|
||||
holder.tvPassengerNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
noticeTrafficStylePushData?.let { it1 -> CallerHmiManager.showTrafficBanner(it1) }
|
||||
}
|
||||
}
|
||||
}else if(noticeFrCloudMsg.type == 1){
|
||||
val noticeTrafficStylePushData = noticeFrCloudMsg.trafficPushData
|
||||
holder.tvPassengerNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerNoticeContent.text = noticeTrafficStylePushData?.content
|
||||
GlideApp.with(activity).load(noticeTrafficStylePushData?.poiImgUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivPassengerNoticeImage)
|
||||
holder.tvPassengerNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
noticeTrafficStylePushData?.let { it1 -> CallerHmiManager.showTrafficBanner(it1) }
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}else if(holder is BubbleV2XHolder){
|
||||
data?.let {
|
||||
val msgBoxBean = it[position]
|
||||
val v2XMsg = msgBoxBean.bean as V2XMsg
|
||||
holder.tvPassengerV2XTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerV2XContent.text = v2XMsg.content
|
||||
if(msgBoxBean.type == MsgBoxType.OBU){
|
||||
is BubbleV2XHolder -> {
|
||||
data?.let {
|
||||
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(
|
||||
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type)))
|
||||
}else{
|
||||
holder.ivPassengerV2XImage.setImageDrawable(activity.resources.getDrawable(
|
||||
EventTypeEnum.getUpdateIconRes(v2XMsg.type)))
|
||||
}
|
||||
}
|
||||
is BubbleSummaryHolder -> {
|
||||
data?.let {
|
||||
val summaryMsg= it[position].bean as V2XMsg
|
||||
holder.tvPassengerSummaryTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerSummaryContent.text = summaryMsg.content
|
||||
holder.tvPassengerSummaryCheck.setOnClickListener {
|
||||
//跳转全览模式
|
||||
// CallerHmiManager.showSmallFragment()
|
||||
CallerMsgBoxEventListenerManager.invokeListener()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val msgBoxBean: MsgBoxBean = data!![position]
|
||||
countDownTimer =object: CountDownTimer(CallerMsgBoxManager.getDismissTime(),1000){
|
||||
override fun onTick(p0: Long) {
|
||||
@@ -125,10 +141,12 @@ class PassengerMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView
|
||||
override fun getItemCount() = data?.size ?: 0
|
||||
|
||||
override fun getItemViewType(position: Int): Int {
|
||||
if(data!![position].type == MsgBoxType.NOTICE){
|
||||
return notice
|
||||
}else{
|
||||
return v2x
|
||||
return if(data!![position].type == MsgBoxType.NOTICE){
|
||||
notice
|
||||
}else if(data!![position].type == MsgBoxType.V2X && data!![position].sourceType == DataSourceType.SUMMARY){
|
||||
summary
|
||||
} else{
|
||||
v2x
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,4 +166,11 @@ class PassengerMsgBoxBubbleAdapter(private val activity: Activity): RecyclerView
|
||||
var tvPassengerV2XContent: TextView = itemView.findViewById(R.id.tvPassengerV2XContent)
|
||||
}
|
||||
|
||||
//汇总消息
|
||||
class BubbleSummaryHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
var tvPassengerSummaryContent: TextView = itemView.findViewById(R.id.tvPassengerSummaryContent)
|
||||
var tvPassengerSummaryCheck: TextView = itemView.findViewById(R.id.tvPassengerSummaryCheck)
|
||||
var tvPassengerSummaryTime: TextView = itemView.findViewById(R.id.tvPassengerSummaryTime)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -7,14 +7,11 @@ 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.enums.DataSourceType
|
||||
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
|
||||
import com.mogo.eagle.core.data.msgbox.V2XMsg
|
||||
import com.mogo.eagle.core.data.notice.NoticeNormalData
|
||||
import com.mogo.eagle.core.data.msgbox.*
|
||||
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.utilcode.mogo.glide.GlideApp
|
||||
import com.mogo.eagle.core.utilcode.mogo.glide.transform.GlideRoundedCornersTransform
|
||||
@@ -32,6 +29,7 @@ class PassengerMsgBoxListAdapter(private val activity: Activity): RecyclerView.A
|
||||
|
||||
private val notice: Int = 1
|
||||
private val v2x: Int = 2
|
||||
private val summary: Int = 3
|
||||
|
||||
fun setData(data: List<MsgBoxBean>){
|
||||
this.data = data
|
||||
@@ -39,61 +37,78 @@ class PassengerMsgBoxListAdapter(private val activity: Activity): RecyclerView.A
|
||||
}
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
|
||||
return if(viewType == notice){
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_list_notice,parent,false)
|
||||
ListNoticeHolder(view)
|
||||
}else{
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_list_v2x,parent,false)
|
||||
ListV2XHolder(view)
|
||||
return when (viewType) {
|
||||
notice -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_list_notice,parent,false)
|
||||
ListNoticeHolder(view)
|
||||
}
|
||||
summary -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_list_summary,parent,false)
|
||||
ListSummaryHolder(view)
|
||||
}
|
||||
else -> {
|
||||
val view = LayoutInflater.from(parent.context).inflate(R.layout.item_passenger_msg_list_v2x,parent,false)
|
||||
ListV2XHolder(view)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
|
||||
if(holder is ListNoticeHolder){
|
||||
data?.let {
|
||||
val noticeFrCloudMsg = it[position].bean as NoticeFrCloudMsg
|
||||
if(noticeFrCloudMsg.type == 0){
|
||||
val noticeNormalData = noticeFrCloudMsg.noticeNormalData
|
||||
holder.tvPassengerNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerNoticeContent.text = noticeNormalData?.content
|
||||
GlideApp.with(activity).load(noticeNormalData?.imageUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivPassengerNoticeImage)
|
||||
holder.tvPassengerNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
noticeNormalData?.let { it1 -> CallerHmiManager.showNoticeNormalData(it1) }
|
||||
}
|
||||
}else if(noticeFrCloudMsg.type == 1){
|
||||
val noticeTrafficStylePushData = noticeFrCloudMsg.trafficPushData
|
||||
holder.tvPassengerNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerNoticeContent.text = noticeTrafficStylePushData?.content
|
||||
GlideApp.with(activity).load(noticeTrafficStylePushData?.poiImgUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivPassengerNoticeImage)
|
||||
holder.tvPassengerNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
noticeTrafficStylePushData?.let { it1 -> CallerHmiManager.showTrafficBanner(it1) }
|
||||
when (holder) {
|
||||
is ListNoticeHolder -> {
|
||||
data?.let {
|
||||
val noticeFrCloudMsg = it[position].bean as NoticeFrCloudMsg
|
||||
if(noticeFrCloudMsg.type == 0){
|
||||
val noticeNormalData = noticeFrCloudMsg.noticeNormalData
|
||||
holder.tvPassengerNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerNoticeContent.text = noticeNormalData?.content
|
||||
GlideApp.with(activity).load(noticeNormalData?.imageUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivPassengerNoticeImage)
|
||||
holder.tvPassengerNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
noticeNormalData?.let { it1 -> CallerHmiManager.showNoticeNormalData(it1) }
|
||||
}
|
||||
}else if(noticeFrCloudMsg.type == 1){
|
||||
val noticeTrafficStylePushData = noticeFrCloudMsg.trafficPushData
|
||||
holder.tvPassengerNoticeTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerNoticeContent.text = noticeTrafficStylePushData?.content
|
||||
GlideApp.with(activity).load(noticeTrafficStylePushData?.poiImgUrl).optionalTransform(
|
||||
GlideRoundedCornersTransform(
|
||||
20f,
|
||||
GlideRoundedCornersTransform.CornerType.ALL
|
||||
)
|
||||
).into(holder.ivPassengerNoticeImage)
|
||||
holder.tvPassengerNoticeCheck.setOnClickListener {
|
||||
//云公告
|
||||
noticeTrafficStylePushData?.let { it1 -> CallerHmiManager.showTrafficBanner(it1) }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}else if(holder is ListV2XHolder){
|
||||
data?.let {
|
||||
val msgBoxBean = it[position]
|
||||
val v2XMsg = msgBoxBean.bean as V2XMsg
|
||||
holder.tvPassengerV2XTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerV2XContent.text = v2XMsg.content
|
||||
if(msgBoxBean.type == MsgBoxType.OBU){
|
||||
is ListV2XHolder -> {
|
||||
data?.let {
|
||||
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(
|
||||
EventTypeEnumNew.getUpdateIconRes(v2XMsg.type)))
|
||||
}else{
|
||||
holder.ivPassengerV2XImage.setImageDrawable(activity.resources.getDrawable(
|
||||
EventTypeEnum.getUpdateIconRes(v2XMsg.type)))
|
||||
}
|
||||
}
|
||||
is ListSummaryHolder -> {
|
||||
data?.let {
|
||||
val summaryMsg= it[position].bean as V2XMsg
|
||||
holder.tvPassengerSummaryTime.text = TimeUtils.millis2String(it[position].timestamp,getHourMinFormat())
|
||||
holder.tvPassengerSummaryContent.text = summaryMsg.content
|
||||
holder.tvPassengerSummaryCheck.setOnClickListener {
|
||||
//跳转全览模式
|
||||
// CallerHmiManager.showSmallFragment()
|
||||
CallerMsgBoxEventListenerManager.invokeListener()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -102,10 +117,12 @@ class PassengerMsgBoxListAdapter(private val activity: Activity): RecyclerView.A
|
||||
override fun getItemCount() = data?.size ?: 0
|
||||
|
||||
override fun getItemViewType(position: Int): Int {
|
||||
if(data!![position].type == MsgBoxType.NOTICE){
|
||||
return notice
|
||||
}else{
|
||||
return v2x
|
||||
return if(data!![position].type == MsgBoxType.NOTICE){
|
||||
notice
|
||||
}else if(data!![position].type == MsgBoxType.V2X && data!![position].sourceType == DataSourceType.SUMMARY){
|
||||
summary
|
||||
} else{
|
||||
v2x
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,4 +142,11 @@ class PassengerMsgBoxListAdapter(private val activity: Activity): RecyclerView.A
|
||||
var tvPassengerV2XContent: TextView = itemView.findViewById(R.id.tvPassengerV2XContent)
|
||||
}
|
||||
|
||||
//汇总消息
|
||||
class ListSummaryHolder(itemView: View): RecyclerView.ViewHolder(itemView){
|
||||
var tvPassengerSummaryContent: TextView = itemView.findViewById(R.id.tvPassengerSummaryContent)
|
||||
var tvPassengerSummaryCheck: TextView = itemView.findViewById(R.id.tvPassengerSummaryCheck)
|
||||
var tvPassengerSummaryTime: TextView = itemView.findViewById(R.id.tvPassengerSummaryTime)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -16,6 +16,7 @@ import androidx.appcompat.widget.PopupMenu
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.view.*
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import chassis.Chassis
|
||||
import chassis.ChassisStatesOuterClass
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient
|
||||
@@ -63,6 +64,7 @@ import com.mogo.eagle.core.function.hmi.ui.logcatch.ILogViewListener
|
||||
import com.mogo.eagle.core.function.hmi.ui.logcatch.LogInfoView
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.DemoModeView
|
||||
import com.mogo.eagle.core.utilcode.kotlin.currentPadding
|
||||
import com.mogo.eagle.core.utilcode.kotlin.lifecycleOwner
|
||||
import com.mogo.eagle.core.utilcode.kotlin.onClick
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.LogLevel
|
||||
@@ -74,9 +76,12 @@ import com.mogo.eagle.core.utilcode.mogo.toast.TipToast
|
||||
import com.mogo.eagle.core.utilcode.util.*
|
||||
import com.mogo.map.uicontroller.VisualAngleMode
|
||||
import com.mogo.map.uicontroller.VisualAngleMode.*
|
||||
import com.zhidao.easysocket.utils.L
|
||||
import com.mogo.support.obu.MogoObuManager
|
||||
import com.mogo.support.obu.constants.MogoObuLogLevel
|
||||
import com.mogo.support.obu.option.MogoObuLog
|
||||
import com.zhjt.mogo_core_function_devatools.env.*
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.*
|
||||
import kotlinx.coroutines.launch
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo_msg.MogoReportMsg
|
||||
import planning.RoboSweeperTaskIndexOuterClass
|
||||
@@ -88,9 +93,7 @@ import kotlin.collections.component3
|
||||
import kotlin.collections.component4
|
||||
import kotlin.collections.set
|
||||
import kotlin.math.abs
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import kotlinx.coroutines.launch
|
||||
import com.mogo.eagle.core.utilcode.kotlin.lifecycleOwner
|
||||
|
||||
|
||||
/**
|
||||
* @author xiaoyuzhou
|
||||
@@ -1035,49 +1038,6 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
* 设置Hmi点击监听
|
||||
*/
|
||||
private fun setHmiCheckedChangeListener() {
|
||||
/**
|
||||
* 显示、隐藏迈速表
|
||||
*/
|
||||
tbSpeedView.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (!isChecked) {
|
||||
CallerHmiManager.setSpeedChartViewVisibility(View.VISIBLE)
|
||||
} else {
|
||||
CallerHmiManager.setSpeedChartViewVisibility(View.GONE)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示、隐藏“自动驾驶控制按钮”
|
||||
*/
|
||||
tbAutopilotStatusView.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (!isChecked) {
|
||||
CallerHmiManager.setAutopilotStatusViewVisibility(View.VISIBLE)
|
||||
} else {
|
||||
CallerHmiManager.setAutopilotStatusViewVisibility(View.GONE)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示、隐藏视角切换按钮
|
||||
*/
|
||||
tbPerspectiveSwitchView.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (!isChecked) {
|
||||
CallerHmiManager.setPerspectiveSwitchViewVisibility(View.VISIBLE)
|
||||
} else {
|
||||
CallerHmiManager.setPerspectiveSwitchViewVisibility(View.GONE)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示、隐藏工具箱
|
||||
*/
|
||||
tbCheckStatusView.setOnCheckedChangeListener { _, isChecked ->
|
||||
if (!isChecked) {
|
||||
CallerHmiManager.setToolsViewVisibility(View.VISIBLE)
|
||||
} else {
|
||||
CallerHmiManager.setToolsViewVisibility(View.GONE)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 隐藏、显示小地图
|
||||
@@ -1275,7 +1235,14 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
* 设置是否输出OBU日志 true-打印日志,false-不打印日志
|
||||
*/
|
||||
tbObuLog.setOnCheckedChangeListener { _, isChecked ->
|
||||
L.setEnableLog(isChecked)
|
||||
MogoObuManager.getInstance().setEnableLog(isChecked)
|
||||
|
||||
val builder: com.mogo.support.obu.option.MogoObuLog.Builder =
|
||||
MogoObuLog.newBuilder().setEnableStdio(isChecked)
|
||||
if (isChecked) {
|
||||
builder.setStdioLevel(MogoObuLogLevel.DBG)
|
||||
}
|
||||
MogoObuManager.getInstance().logConfig(builder.build())
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.config.HmiBuildConfig
|
||||
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig
|
||||
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsFuncConfigListener
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsFuncConfigListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
@@ -19,6 +20,7 @@ import com.mogo.eagle.core.utilcode.kotlin.currentPadding
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.mogo.eagle.core.function.business.routeoverlay.RouteStrategy
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.DemoModeView
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
import kotlinx.android.synthetic.main.view_debug_setting.view.*
|
||||
@@ -150,7 +152,7 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
HmiBuildConfig.isShowLimitingVelocityView = true
|
||||
} else {
|
||||
HmiBuildConfig.isShowLimitingVelocityView = false
|
||||
CallerHmiManager.disableLimitingVelocity()
|
||||
CallerHmiViewControlListenerManager.invokeVisible(IViewControlListener.LimitingVelocityView_TAG,View.GONE)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,23 +10,21 @@ import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.DemoModeView
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
|
||||
class DemoModeHiddenSwitch(context: Context?, attrs: AttributeSet?) : View(context, attrs) {
|
||||
class DemoModeHiddenSwitch(context: Context, attrs: AttributeSet?) : View(context, attrs) {
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
init {
|
||||
isClickable = true
|
||||
setOnClickListener {
|
||||
//只在司机端设置美化模式开关功能
|
||||
if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) {
|
||||
//单次查询,是否有行程信息(订单进行中时点击不生效),autopilotControlParameters为null代表不处于自动驾驶状态下
|
||||
if (CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().autopilotControlParameters == null) {
|
||||
FunctionBuildConfig.isDemoMode = !FunctionBuildConfig.isDemoMode
|
||||
context?.let {
|
||||
CallerHmiManager.updateStatusBarLeftView(
|
||||
FunctionBuildConfig.isDemoMode,
|
||||
"demoMode",
|
||||
DemoModeView(it)
|
||||
)
|
||||
}
|
||||
CallerHmiManager.updateStatusBarLeftView(
|
||||
FunctionBuildConfig.isDemoMode,
|
||||
"demoMode",
|
||||
DemoModeView(context)
|
||||
)
|
||||
CallerAutoPilotManager.setDemoMode(FunctionBuildConfig.isDemoMode)
|
||||
if (!FunctionBuildConfig.isDemoMode) {
|
||||
//关闭美化模式时,通知工控机
|
||||
|
||||
@@ -6,7 +6,7 @@ import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnum
|
||||
import com.mogo.eagle.core.data.enums.EventTypeEnumNew
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
@@ -56,10 +56,10 @@ class TakeOverView @JvmOverloads constructor(
|
||||
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_CHASSIS,
|
||||
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_DISTANCE -> {
|
||||
CallerHmiManager.warningV2X(
|
||||
EventTypeEnum.TAKE_OVER_EVENT.poiType,
|
||||
EventTypeEnum.TAKE_OVER_EVENT.content,
|
||||
EventTypeEnum.TAKE_OVER_EVENT.tts,
|
||||
EventTypeEnum.TAKE_OVER_EVENT.poiType,
|
||||
EventTypeEnumNew.TAKE_OVER_EVENT.poiType,
|
||||
EventTypeEnumNew.TAKE_OVER_EVENT.content,
|
||||
EventTypeEnumNew.TAKE_OVER_EVENT.tts,
|
||||
EventTypeEnumNew.TAKE_OVER_EVENT.poiType,
|
||||
object : IMoGoWarningStatusListener {
|
||||
override fun onShow() {
|
||||
takeOver = true
|
||||
|
||||
@@ -2,34 +2,20 @@ package com.mogo.eagle.core.function.hmi.ui.tools
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.ToolsView_TAG
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.setting.ToolsView.Companion.toolsView
|
||||
|
||||
class ToolsImageView(context: Context, attrs: AttributeSet?) :
|
||||
androidx.appcompat.widget.AppCompatImageView(context, attrs), IViewControlListener {
|
||||
androidx.appcompat.widget.AppCompatImageView(context, attrs) {
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
scaleType = ScaleType.CENTER
|
||||
setBackgroundResource(R.drawable.module_ext_check)
|
||||
setImageResource(R.drawable.icon_tools_nor)
|
||||
scaleType = ScaleType.CENTER
|
||||
setOnClickListener{
|
||||
toolsView.showToolsFloat(context)
|
||||
}
|
||||
|
||||
CallerHmiViewControlListenerManager.addListener(ToolsView_TAG, this)
|
||||
}
|
||||
|
||||
override fun visible(v: Int) {
|
||||
super.visible(v)
|
||||
visibility = v
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerHmiViewControlListenerManager.removeListener(ToolsView_TAG)
|
||||
}
|
||||
}
|
||||
@@ -8,14 +8,11 @@ import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatusInfo
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.AutoPilotStatusView_TAG
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.getCurWgs84Lat
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.getCurWgs84Lon
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_HMI
|
||||
@@ -33,7 +30,7 @@ class AutoPilotStatusView constructor(
|
||||
attrs: AttributeSet
|
||||
) : ConstraintLayout(context, attrs),
|
||||
View.OnClickListener,
|
||||
IMoGoAutopilotStatusListener, IViewControlListener {
|
||||
IMoGoAutopilotStatusListener {
|
||||
|
||||
companion object {
|
||||
const val TAG = "AutopilotStatusView"
|
||||
@@ -41,33 +38,21 @@ class AutoPilotStatusView constructor(
|
||||
|
||||
private var mAutopilotStatus: Int = 0
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
init{
|
||||
initView(context)
|
||||
}
|
||||
|
||||
private fun initView(context: Context) {
|
||||
setBackgroundResource(R.drawable.module_hmi_autopilot_status_bg)
|
||||
LayoutInflater.from(context).inflate(R.layout.view_autopilot_status, this, true)
|
||||
|
||||
val lp = LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)
|
||||
layoutParams = lp
|
||||
|
||||
// 设置点击监听
|
||||
setOnClickListener(this)
|
||||
// 自动驾驶状态监听
|
||||
CallerAutoPilotStatusListenerManager.addListener(TAG, this)
|
||||
CallerHmiViewControlListenerManager.addListener(AutoPilotStatusView_TAG, this)
|
||||
|
||||
CallerLogger.d("$M_HMI$TAG", "autopilotStatus: $mAutopilotStatus")
|
||||
setAutoPilotStatus(mAutopilotStatus)
|
||||
}
|
||||
|
||||
override fun visible(v: Int) {
|
||||
super.visible(v)
|
||||
visibility = v
|
||||
}
|
||||
|
||||
override fun onClick(v: View?) {
|
||||
when (mAutopilotStatus) {
|
||||
0 -> {// 不可自动驾驶,adas与工控机没有链接,或工控机异常
|
||||
@@ -139,7 +124,6 @@ class AutoPilotStatusView constructor(
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerAutoPilotStatusListenerManager.removeListener(TAG)
|
||||
CallerHmiViewControlListenerManager.removeListener(AutoPilotStatusView_TAG)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,15 +2,12 @@ package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.CameraView_TAG
|
||||
import com.mogo.eagle.core.function.call.biz.CallerFuncBizManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.function.hmi.ui.setting.CameraLiveView.Companion.cameraLiveView
|
||||
|
||||
class CameraView(context: Context, attrs: AttributeSet?) :
|
||||
androidx.appcompat.widget.AppCompatImageView(context, attrs), IViewControlListener {
|
||||
androidx.appcompat.widget.AppCompatImageView(context, attrs) {
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
@@ -28,16 +25,6 @@ class CameraView(context: Context, attrs: AttributeSet?) :
|
||||
}
|
||||
}
|
||||
|
||||
CallerHmiViewControlListenerManager.addListener(CameraView_TAG, this)
|
||||
}
|
||||
|
||||
override fun visible(v: Int) {
|
||||
super.visible(v)
|
||||
visibility = v
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerHmiViewControlListenerManager.removeListener(CameraView_TAG)
|
||||
}
|
||||
}
|
||||
@@ -3,25 +3,59 @@ package com.mogo.eagle.core.function.hmi.ui.widget
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewLimitingVelocity
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.data.enums.DataSourceType
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.LimitingVelocityView_TAG
|
||||
import com.mogo.eagle.core.function.api.v2x.ILimitingVelocityListener
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.call.v2x.CallerViewLimitingVelocityListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import kotlinx.android.synthetic.main.view_limiting_speed_vr.view.*
|
||||
|
||||
/**
|
||||
* 限速控件
|
||||
*/
|
||||
class LimitingVelocityView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : IViewLimitingVelocity(context, attrs, defStyleAttr) {
|
||||
class LimitingVelocityView constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
) : ConstraintLayout(context, attrs), ILimitingVelocityListener, IViewControlListener {
|
||||
|
||||
companion object {
|
||||
private const val TAG = "LimitingVelocityView"
|
||||
}
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_limiting_speed_vr, this, true)
|
||||
}
|
||||
|
||||
override fun updateLimitingSpeed(limitingSpeed: Int, limitSource: Int) {
|
||||
super.updateLimitingSpeed(limitingSpeed, limitSource)
|
||||
tvLimitingVelocity.text = "$limitingSpeed"
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerViewLimitingVelocityListenerManager.addListener(TAG, this)
|
||||
CallerHmiViewControlListenerManager.addListener(LimitingVelocityView_TAG, this)
|
||||
}
|
||||
|
||||
override fun onLimitingVelocityChange(limitingVelocity: Int, sourceType: DataSourceType) {
|
||||
if (limitingVelocity > 0) {
|
||||
this.visibility = View.VISIBLE
|
||||
tvLimitingVelocity.text = "$limitingVelocity"
|
||||
tvLimitingSource.text = sourceType.name
|
||||
} else {
|
||||
this.visibility = View.GONE
|
||||
tvLimitingSource.text = ""
|
||||
}
|
||||
}
|
||||
|
||||
override fun visible(v: Int) {
|
||||
super.visible(v)
|
||||
this.visibility = v
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerViewLimitingVelocityListenerManager.removeListener(TAG)
|
||||
CallerHmiViewControlListenerManager.removeListener(LimitingVelocityView_TAG)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,9 +5,6 @@ import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.FrameLayout
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.PerspectiveSwitchView_TAG
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager.getMapUIController
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.map.uicontroller.VisualAngleMode
|
||||
@@ -22,20 +19,13 @@ class PerspectiveSwitchView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : FrameLayout(context, attrs, defStyleAttr), View.OnClickListener, IViewControlListener{
|
||||
) : FrameLayout(context, attrs, defStyleAttr), View.OnClickListener{
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
LayoutInflater.from(context).inflate(R.layout.view_perspective_switch, this, true)
|
||||
setBackgroundResource(R.drawable.module_switch_map_bg)
|
||||
setOnClickListener(this)
|
||||
|
||||
CallerHmiViewControlListenerManager.addListener(PerspectiveSwitchView_TAG,this)
|
||||
}
|
||||
|
||||
override fun visible(v: Int) {
|
||||
super.visible(v)
|
||||
visibility = v
|
||||
}
|
||||
|
||||
override fun onClick(v: View?) {
|
||||
@@ -53,9 +43,4 @@ class PerspectiveSwitchView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerHmiViewControlListenerManager.removeListener(PerspectiveSwitchView_TAG)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -6,11 +6,7 @@ import android.util.AttributeSet
|
||||
import android.view.Gravity
|
||||
import android.widget.FrameLayout
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoChassisLocationGCJ02Listener
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.SpeedPanelView_TAG
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLocationGCJ20ListenerManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
|
||||
@@ -25,7 +21,7 @@ class SpeedPanelView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : FrameLayout(context, attrs, defStyleAttr), IMoGoChassisLocationGCJ02Listener,IViewControlListener {
|
||||
) : FrameLayout(context, attrs, defStyleAttr), IMoGoChassisLocationGCJ02Listener {
|
||||
|
||||
companion object {
|
||||
const val TAG = "SpeedPanelView"
|
||||
@@ -58,8 +54,6 @@ class SpeedPanelView @JvmOverloads constructor(
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
// 注册view控制显示隐藏监听
|
||||
CallerHmiViewControlListenerManager.addListener(SpeedPanelView_TAG,this)
|
||||
// 注册位置回调
|
||||
CallerChassisLocationGCJ20ListenerManager.addListener(TAG, this)
|
||||
// 开启定时查询速度
|
||||
@@ -89,15 +83,9 @@ class SpeedPanelView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
override fun visible(v: Int) {
|
||||
super.visible(v)
|
||||
visibility = v
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
// 解除注册
|
||||
CallerHmiViewControlListenerManager.removeListener(SpeedPanelView_TAG)
|
||||
CallerChassisLocationGCJ20ListenerManager.removeListener(TAG)
|
||||
try {
|
||||
timerTask?.cancel()
|
||||
|
||||
@@ -6,6 +6,7 @@ import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import android.widget.LinearLayout
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.eagle.core.data.mofang.MfConstants
|
||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
||||
import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener
|
||||
@@ -51,6 +52,7 @@ class StatusBarView @JvmOverloads constructor(
|
||||
//将状态窗口中的状态移到状态栏上
|
||||
CallerDevaToolsManager.showStatusBar(context, status_container)
|
||||
|
||||
updateStatusBarRightView(FunctionBuildConfig.isDemoMode, "demoMode", DemoModeView(this.context))
|
||||
}
|
||||
|
||||
override fun onSkinModeChange(skinMode: Int) {
|
||||
|
||||
@@ -52,7 +52,7 @@ class VersionNameView @JvmOverloads constructor(
|
||||
@SuppressLint("SetTextI18n")
|
||||
private fun showCurrentPadVersion() {
|
||||
tvAppVersionName?.let {
|
||||
it.text = "APP:${AppUtils.getAppVersionName()}"
|
||||
// it.text = "APP:${AppUtils.getAppVersionName()}"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,32 +27,14 @@ class VipIdentificationView : ConstraintLayout, IMoGoVipSetListener {
|
||||
attributeSet,
|
||||
defStyleAttr
|
||||
) {
|
||||
init(attributeSet, defStyleAttr)
|
||||
}
|
||||
|
||||
private var marginStart: Float = 0.0f
|
||||
private var marginTop: Float = 0.0f
|
||||
|
||||
private fun init(attrs: AttributeSet, defStyleAttr: Int) {
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_vip_identification, this, true)
|
||||
val a = context.obtainStyledAttributes(
|
||||
attrs,
|
||||
R.styleable.VipIdentificationView,
|
||||
defStyleAttr,
|
||||
0
|
||||
)
|
||||
marginStart = a.getDimension(R.styleable.VipIdentificationView_marginStart, 0.0f)
|
||||
marginTop = a.getDimension(R.styleable.VipIdentificationView_marginTop, 0.0f)
|
||||
a.recycle()
|
||||
}
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
val lp = this.layoutParams as LayoutParams
|
||||
lp.marginStart = marginStart.toInt()
|
||||
lp.topMargin = marginTop.toInt()
|
||||
this.layoutParams = lp
|
||||
invalidate()
|
||||
CallVipSetListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
|
||||
@@ -41,10 +41,10 @@ import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotStatusListener;
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager;
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager;
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager;
|
||||
import com.mogo.eagle.core.function.call.startup.CallerStartUpManager;
|
||||
import com.mogo.eagle.core.function.hmi.R;
|
||||
import com.mogo.eagle.core.function.hmi.ui.widget.StatusBarView;
|
||||
import com.mogo.eagle.core.function.main.modules.MogoModulesManager;
|
||||
import com.mogo.eagle.core.function.main.stagetwo.AutopilotStartup;
|
||||
import com.mogo.eagle.core.function.main.windowview.FloatingViewHandler;
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppLaunchTimeUtils;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
@@ -163,7 +163,7 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
ContextHolderUtil.holdContext(this);
|
||||
// 监听工控机连接信息
|
||||
CallerAutoPilotStatusListenerManager.INSTANCE.addListener(TAG, this);
|
||||
startUpInStage2();
|
||||
CallerStartUpManager.initStageTwo();
|
||||
// 加载模块
|
||||
mPresenter.postLoadModuleMsg();
|
||||
// 监听网络状态
|
||||
@@ -218,26 +218,6 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
mConnectInfoRV.setAdapter(mConnAdapter);
|
||||
}
|
||||
|
||||
/**
|
||||
* 第二阶段初始化,第一阶段初始化可查看:{@link com.mogo.launcher.stageone}
|
||||
*/
|
||||
public void startUpInStage2() {
|
||||
StartupConfig config = null;
|
||||
if (DebugConfig.isDebug()) {
|
||||
config = new StartupConfig.Builder()
|
||||
.setLoggerLevel(LoggerLevel.DEBUG)
|
||||
.setOpenStatistics(true)
|
||||
.build();
|
||||
}
|
||||
new StartupManager.Builder()
|
||||
.addStartup(new AutopilotStartup())
|
||||
// .addStartup(new APMStartup())
|
||||
.setConfig(config)
|
||||
.build(this)
|
||||
.start()
|
||||
.await();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadModules() {
|
||||
final long start = System.currentTimeMillis();
|
||||
|
||||
@@ -149,10 +149,14 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis
|
||||
ochProvider = (IMoGoFunctionProvider) ARouter.getInstance()
|
||||
.build("/driver/api")
|
||||
.navigation(getContext());
|
||||
} else {
|
||||
} else if(AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode)){
|
||||
ochProvider = (IMoGoFunctionProvider) ARouter.getInstance()
|
||||
.build("/passenger/api")
|
||||
.navigation(getContext());
|
||||
} else {
|
||||
ochProvider = (IMoGoFunctionProvider) ARouter.getInstance()
|
||||
.build("/noop/api")
|
||||
.navigation(getContext());
|
||||
}
|
||||
}
|
||||
// 处理一个机器多个屏幕方案
|
||||
|
||||
@@ -34,7 +34,6 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
import com.mogo.eagle.core.utilcode.util.ProcessUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.SPUtils;
|
||||
import com.zhidao.support.obu.ami.AmiClientManager;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.reflect.Field;
|
||||
@@ -203,7 +202,7 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
|
||||
*/
|
||||
private void connectAmiIp() {
|
||||
String ipAddress = SharedPrefsMgr.getInstance(AbsMogoApplication.getApp().getBaseContext()).getString(MoGoConfig.OBU_IP, "192.168.1.199");
|
||||
AmiClientManager.getInstance().setObuIp(ipAddress);
|
||||
// AmiClientManager.getInstance().setObuIp(ipAddress);
|
||||
}
|
||||
|
||||
private void initModules() {
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
package com.mogo.eagle.core.function.main.stagetwo;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths;
|
||||
import com.rousetime.android_startup.AndroidStartup;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class AutopilotStartup extends AndroidStartup<Boolean> {
|
||||
@Nullable
|
||||
@Override
|
||||
public Boolean create(@NonNull Context context) {
|
||||
ARouter.getInstance().build(MogoServicePaths.PATH_AUTO_PILOT).navigation();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean callCreateOnMainThread() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean waitOnMainThread() {
|
||||
return false;
|
||||
}
|
||||
|
||||
// @Nullable
|
||||
// @Override
|
||||
// public List<String> dependenciesByName() {
|
||||
// List<String> deps = new ArrayList<>();
|
||||
// deps.add("com.mogo.eagle.core.function.main.stagetwo.APMStartup");
|
||||
// return deps;
|
||||
// }
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
package com.mogo.eagle.core.function.main.stagetwo;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.rousetime.android_startup.AndroidStartup;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MapStartup extends AndroidStartup<Boolean> {
|
||||
@Nullable
|
||||
@Override
|
||||
public Boolean create(@NonNull Context context) {
|
||||
// TODO:暂不支持分步加载
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean callCreateOnMainThread() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean waitOnMainThread() {
|
||||
return false;
|
||||
}
|
||||
|
||||
// @Nullable
|
||||
// @Override
|
||||
// public List<String> dependenciesByName() {
|
||||
// List<String> deps = new ArrayList<>();
|
||||
// deps.add("com.mogo.eagle.core.function.main.stagetwo.APMStartup");
|
||||
// return deps;
|
||||
// }
|
||||
}
|
||||
@@ -20,82 +20,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:paddingTop="72dp">
|
||||
<!--Vip车辆标志-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.VipIdentificationView
|
||||
android:layout_width="@dimen/module_vip_width"
|
||||
android:layout_height="@dimen/module_vip_height"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<!--接管提示-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.takeover.TakeOverView
|
||||
android:id="@+id/clTakeOverView"
|
||||
android:layout_width="@dimen/hmi_take_over_request_width"
|
||||
android:layout_height="@dimen/hmi_take_over_request_height"
|
||||
android:layout_marginTop="@dimen/hmi_take_over_request_m_top"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<!--地图视角切换-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.PerspectiveSwitchView
|
||||
android:id="@+id/viewPerspectiveSwitch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="50dp"
|
||||
android:layout_marginBottom="40dp"
|
||||
android:elevation="@dimen/dp_10"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<!--隐藏态下的 美化模式按钮-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.switch.DemoModeHiddenSwitch
|
||||
android:id="@+id/viewDemoModeSwitch"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_marginStart="40dp"
|
||||
android:layout_marginBottom="200dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<!--限速牌子-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.LimitingVelocityView
|
||||
android:id="@+id/viewLimitingVelocity"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
android:layout_marginTop="30dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:background="@drawable/bg_waring_limiting_velocity"
|
||||
android:elevation="@dimen/dp_10"
|
||||
android:gravity="center"
|
||||
android:text="60"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="60dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_goneMarginEnd="40dp"
|
||||
app:layout_goneMarginTop="40dp"
|
||||
tools:visibility="gone" />
|
||||
<!-- todo 需要放入使用方 -->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/ivCameraIcon"-->
|
||||
|
||||
<!--限速来源-->
|
||||
<TextView
|
||||
android:id="@+id/tvLimitingSource"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="35dp"
|
||||
android:gravity="center"
|
||||
android:text=""
|
||||
android:textColor="@color/color_FFFFFF"
|
||||
android:textSize="@dimen/dp_30"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/viewLimitingVelocity" />
|
||||
|
||||
<!--消息盒子司机端选择入口-->
|
||||
<CheckBox
|
||||
@@ -107,9 +31,10 @@
|
||||
android:background="@drawable/selector_msg_box"
|
||||
android:button="@null"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintRight_toLeftOf="@id/viewLimitingVelocity"
|
||||
app:layout_constraintRight_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
<!-- todo 需要放入使用方 , view先gone掉方便重组 -->
|
||||
<!-- app:layout_constraintRight_toLeftOf="@id/viewLimitingVelocity"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/ivCameraIcon" />-->
|
||||
|
||||
<!--司机端消息提示-->
|
||||
@@ -209,33 +134,6 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<!--pnc行为决策-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.pnc.PncActionsView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_110"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<!--APP、MAP版本-->
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.VersionNameView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="45dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/statusBarContainer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="30dp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/viewLimitingVelocity"
|
||||
app:layout_constraintTop_toTopOf="@+id/viewLimitingVelocity"
|
||||
app:layout_goneMarginEnd="40dp"
|
||||
app:layout_goneMarginTop="30dp" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,64 @@
|
||||
<?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="804dp"
|
||||
android:layout_height="160dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="30dp"
|
||||
android:layout_marginEnd="30dp"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="7dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivSummaryImage"
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="130dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginStart="15dp"
|
||||
android:src="@drawable/icon_notice_default"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSummaryTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="蘑菇小助手"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32dp"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivSummaryImage"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvSummaryContent"
|
||||
android:layout_marginStart="15dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSummaryContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvSummaryTitle"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvSummaryTitle"
|
||||
app:layout_constraintRight_toRightOf="@id/tvSummaryTime"
|
||||
android:gravity="start"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSummaryTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/tvSummaryTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvSummaryTitle"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:textColor="#80FFFFFF"
|
||||
android:textSize="24dp"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -0,0 +1,62 @@
|
||||
<?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="804dp"
|
||||
android:layout_height="160dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#53000000"
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_marginBottom="7dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivSummaryImage"
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="130dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:layout_marginStart="15dp"
|
||||
android:src="@drawable/icon_notice_default"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSummaryTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="蘑菇小助手"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="32dp"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivSummaryImage"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvSummaryContent"
|
||||
android:layout_marginStart="15dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSummaryContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvSummaryTitle"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvSummaryTitle"
|
||||
app:layout_constraintRight_toRightOf="@id/tvSummaryTime"
|
||||
android:gravity="start"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSummaryTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toTopOf="@id/tvSummaryTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvSummaryTitle"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:textColor="#80FFFFFF"
|
||||
android:textSize="24dp"
|
||||
/>
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -0,0 +1,83 @@
|
||||
<?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="650dp"
|
||||
android:layout_height="160dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#465878"
|
||||
app:roundLayoutRadius="24dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivPassengerSummaryImage"
|
||||
android:layout_width="160dp"
|
||||
android:layout_height="160dp"
|
||||
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/tvPassengerSummaryTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="蘑菇小助手"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="36dp"
|
||||
android:layout_marginStart="20dp"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivPassengerSummaryImage"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvPassengerSummaryContent"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerSummaryContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="28dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvPassengerSummaryTitle"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvPassengerSummaryTitle"
|
||||
app:layout_constraintRight_toRightOf="@id/tvPassengerSummaryTime"
|
||||
android:gravity="start"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerSummaryCheck"
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="160dp"
|
||||
android:text="查 看"
|
||||
android:textColor="#FF84D4FF"
|
||||
android:textSize="28dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="80dp"
|
||||
android:background="#5E70A6"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvPassengerSummaryCheck"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerSummaryTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="26dp"
|
||||
app:layout_constraintTop_toTopOf="@id/tvPassengerSummaryTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvPassengerSummaryTitle"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvPassengerSummaryCheck"
|
||||
android:layout_marginEnd="20dp"
|
||||
/>
|
||||
|
||||
|
||||
</com.mogo.eagle.core.widget.RoundConstraintLayout>
|
||||
@@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="150dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivPassengerSummaryImage"
|
||||
android:layout_width="96dp"
|
||||
android:layout_height="96dp"
|
||||
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/tvPassengerSummaryTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="蘑菇小助手"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="36dp"
|
||||
android:layout_marginStart="20dp"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivPassengerSummaryImage"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/tvPassengerSummaryContent"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerSummaryContent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="28dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvPassengerSummaryTitle"
|
||||
app:layout_constraintLeft_toLeftOf="@id/tvPassengerSummaryTitle"
|
||||
app:layout_constraintRight_toRightOf="@id/tvPassengerSummaryTime"
|
||||
android:gravity="start"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerSummaryCheck"
|
||||
android:layout_width="140dp"
|
||||
android:layout_height="150dp"
|
||||
android:text="查 看"
|
||||
android:textColor="#FF84D4FF"
|
||||
android:textSize="28dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
android:gravity="center"
|
||||
/>
|
||||
|
||||
<View
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="80dp"
|
||||
android:background="#5E70A6"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvPassengerSummaryCheck"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerSummaryTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="26dp"
|
||||
app:layout_constraintTop_toTopOf="@id/tvPassengerSummaryTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvPassengerSummaryTitle"
|
||||
app:layout_constraintRight_toLeftOf="@id/tvPassengerSummaryCheck"
|
||||
android:layout_marginEnd="20dp"
|
||||
/>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1274,54 +1274,6 @@
|
||||
app:layout_constraintLeft_toRightOf="@+id/tbChangeCurrentCarIcon"
|
||||
app:layout_constraintTop_toTopOf="@id/tbChangeCurrentCarIcon" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbSpeedView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:layout_margin="2dp"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:textOff="隐藏「脉速表」"
|
||||
android:textOn="显示「脉速表」"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbAutopilotStatusView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:layout_margin="2dp"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:textOff="隐藏「自动驾驶控制按钮」"
|
||||
android:textOn="显示「自动驾驶控制按钮」"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbPerspectiveSwitchView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:layout_margin="2dp"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:textOff="隐藏「视角切换按钮」"
|
||||
android:textOn="显示「视角切换按钮」"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbCheckStatusView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:layout_margin="2dp"
|
||||
android:gravity="center"
|
||||
android:padding="@dimen/dp_20"
|
||||
android:textOff="隐藏「工具箱」"
|
||||
android:textOn="显示「工具箱」"
|
||||
android:textSize="@dimen/dp_24" />
|
||||
|
||||
<ToggleButton
|
||||
android:id="@+id/tbControlView"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="150dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<!--消息盒子司机端选择入口-->
|
||||
<CheckBox
|
||||
android:id="@+id/cbMsgBoxDriver"
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="150dp"
|
||||
android:background="@drawable/selector_msg_box"
|
||||
android:button="@null"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
/>
|
||||
|
||||
<!--司机端消息提示-->
|
||||
<View
|
||||
android:id="@+id/MsgBoxTipView"
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="8dp"
|
||||
android:background="@drawable/version_upgrade_tips_background"
|
||||
android:translationZ="30dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintCircle="@id/cbMsgBoxDriver"
|
||||
app:layout_constraintCircleAngle="40"
|
||||
app:layout_constraintCircleRadius="32dp"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -1,22 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvLimitingVelocity"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="120dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
android:background="@drawable/bg_waring_limiting_velocity"
|
||||
android:elevation="@dimen/dp_10"
|
||||
android:gravity="center"
|
||||
android:text="60"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/dp_60"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ivCameraIcon"
|
||||
/>
|
||||
android:textSize="@dimen/dp_60"/>
|
||||
|
||||
</LinearLayout>
|
||||
<!--限速来源-->
|
||||
<TextView
|
||||
android:id="@+id/tvLimitingSource"
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginEnd="40dp"
|
||||
android:gravity="center"
|
||||
android:text=""
|
||||
android:textColor="@color/color_FFFFFF"
|
||||
android:textSize="@dimen/dp_30"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tvLimitingVelocity"
|
||||
android:visibility="gone" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<!--消息盒子乘客端选择入口-->
|
||||
<CheckBox
|
||||
android:id="@+id/cbMsgBoxPassenger"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:background="@drawable/selector_msg_box_p"
|
||||
android:button="@null"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent" />
|
||||
|
||||
<!--乘客端消息提示-->
|
||||
<View
|
||||
android:id="@+id/MsgBoxPTipView"
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:background="@drawable/version_upgrade_tips_background"
|
||||
android:translationZ="30dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintCircle="@id/cbMsgBoxPassenger"
|
||||
app:layout_constraintCircleAngle="40"
|
||||
app:layout_constraintCircleRadius="50dp"
|
||||
tools:ignore="MissingConstraints" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -69,9 +69,4 @@
|
||||
<item name="android:borderlessButtonStyle">@android:color/transparent</item>
|
||||
</style>
|
||||
|
||||
<declare-styleable name="VipIdentificationView">
|
||||
<attr name="marginStart" format="dimension" />
|
||||
<attr name="marginTop" format="dimension" />
|
||||
</declare-styleable>
|
||||
|
||||
</resources>
|
||||
Reference in New Issue
Block a user