diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/biz/PassiveBadCaseWindow.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/biz/PassiveBadCaseWindow.kt index 1a4e463101..58e49237c1 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/biz/PassiveBadCaseWindow.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/biz/PassiveBadCaseWindow.kt @@ -17,6 +17,7 @@ import com.google.android.flexbox.FlexboxLayout import com.mogo.cloud.passport.MoGoAiCloudClientConfig import com.mogo.eagle.core.data.app.AppConfigInfo import com.mogo.eagle.core.data.msgbox.MsgBoxBean +import com.mogo.eagle.core.data.msgbox.MsgCategory import com.mogo.eagle.core.data.msgbox.RecordBagMsg import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarStateListener import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarStatusListenerManager @@ -275,14 +276,20 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene mInViewY = motionEvent.y // 获取相对屏幕的坐标,即以屏幕左上角为原点 mDownInScreenX = motionEvent.rawX - mDownInScreenY = motionEvent.rawY - BarUtils.getStatusBarHeight() +// mDownInScreenY = motionEvent.rawY - BarUtils.getStatusBarHeight() +// mInScreenX = motionEvent.rawX +// mInScreenY = motionEvent.rawY - BarUtils.getStatusBarHeight() + + mDownInScreenY = motionEvent.rawY mInScreenX = motionEvent.rawX - mInScreenY = motionEvent.rawY - BarUtils.getStatusBarHeight() + mInScreenY = motionEvent.rawY + } MotionEvent.ACTION_MOVE -> { // 更新浮动窗口位置参数 mInScreenX = motionEvent.rawX - mInScreenY = motionEvent.rawY - BarUtils.getStatusBarHeight() +// mInScreenY = motionEvent.rawY - BarUtils.getStatusBarHeight() + mInScreenY = motionEvent.rawY mWindowParams!!.x = (mInScreenX - mInViewX).toInt() mWindowParams!!.y = (mInScreenY - mInViewY).toInt() // 手指移动的时候更新小悬浮窗的位置 @@ -298,7 +305,7 @@ class PassiveBadCaseWindow constructor(activity: Activity) : View.OnTouchListene // 默认固定位置,靠屏幕右边缘的中间 mWindowManager!!.defaultDisplay.getMetrics(metrics) mWindowParams!!.x = metrics.widthPixels - mWindowParams!!.y = metrics.heightPixels / 2 - BarUtils.getStatusBarHeight()-350 + mWindowParams!!.y = metrics.heightPixels - BarUtils.getStatusBarHeight()-950 mWindowManager!!.addView(mFloatLayout, mWindowParams) } diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/DriverMsgBoxBubbleView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/DriverMsgBoxBubbleView.kt index d033119f6f..766910439f 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/DriverMsgBoxBubbleView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/DriverMsgBoxBubbleView.kt @@ -115,12 +115,4 @@ class DriverMsgBoxBubbleView @JvmOverloads constructor( } } -// var i = 0 -// -// fun setData(){ -// val one = MsgBoxBean(MsgBoxType.OPERATION, OperationMsg(System.currentTimeMillis(),"测试"+i++)) -// dataList.add(one) -// driverMsgBoxBubbleAdapter?.setData(dataList) -// } - } \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/DriverMsgBoxListView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/DriverMsgBoxListView.kt index f2f7d666e4..d5960c0760 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/DriverMsgBoxListView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/DriverMsgBoxListView.kt @@ -7,13 +7,7 @@ import android.view.LayoutInflater import android.view.View import androidx.constraintlayout.widget.ConstraintLayout import androidx.recyclerview.widget.LinearLayoutManager -import com.mogo.eagle.core.data.enums.EventTypeEnum import com.mogo.eagle.core.data.msgbox.MsgBoxBean -import com.mogo.eagle.core.data.msgbox.MsgBoxType -import com.mogo.eagle.core.data.msgbox.OperationMsg -import com.mogo.eagle.core.data.msgbox.RecordBagMsg -import com.mogo.eagle.core.data.notice.NoticeNormalData -import com.mogo.eagle.core.data.report.ReportEntity import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager import com.mogo.eagle.core.function.hmi.R import com.mogo.eagle.core.function.hmi.ui.msgbox.adapter.DriverMsgBoxListAdapter @@ -48,7 +42,7 @@ class DriverMsgBoxListView @JvmOverloads constructor( //获取通知消息列表 noticeList= CallerMsgBoxManager.getCachedNotifyData() as ArrayList? - noticeList?.reversed() + noticeList = noticeList?.reversed() as ArrayList? //获取车辆系统信息列表 ipcReportList = CallerMsgBoxManager.getCachedSysInfoData() as ArrayList? ipcReportList?.reversed() @@ -118,6 +112,7 @@ class DriverMsgBoxListView @JvmOverloads constructor( val localSysInfoList = MsgBoxConfig.systemInfoList.reversed() ipcReportList?.addAll(0,localSysInfoList) val localRecordList = MsgBoxConfig.recordBagList.reversed() + badCaseList?.addAll(0,localRecordList) //获取当前Tab选择 diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/PassengerMsgBoxBubbleView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/PassengerMsgBoxBubbleView.kt index 0976bbc761..edd8a0688b 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/PassengerMsgBoxBubbleView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/PassengerMsgBoxBubbleView.kt @@ -2,9 +2,7 @@ package com.mogo.eagle.core.function.hmi.ui.msgbox import android.app.Activity import android.content.Context -import android.graphics.PixelFormat import android.util.AttributeSet -import android.util.DisplayMetrics import android.view.* import androidx.constraintlayout.widget.ConstraintLayout import androidx.recyclerview.widget.LinearLayoutManager @@ -12,7 +10,6 @@ import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.data.msgbox.MsgBoxBean import com.mogo.eagle.core.data.msgbox.MsgBoxType import com.mogo.eagle.core.data.msgbox.MsgCategory -import com.mogo.eagle.core.data.msgbox.OperationMsg import com.mogo.eagle.core.function.api.msgbox.IMsgBoxListener import com.mogo.eagle.core.function.call.hmi.CallerHmiManager import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxListenerManager @@ -20,7 +17,6 @@ import com.mogo.eagle.core.function.hmi.R import com.mogo.eagle.core.function.hmi.ui.msgbox.adapter.PassengerMsgBoxBubbleAdapter import com.mogo.eagle.core.function.msgbox.MsgBoxConfig import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils -import com.mogo.eagle.core.utilcode.util.BarUtils import com.mogo.eagle.core.utilcode.util.UiThreadHandler import kotlinx.android.synthetic.main.layout_passenger_msg_box_bubble.view.* @@ -48,8 +44,6 @@ class PassengerMsgBoxBubbleView @JvmOverloads constructor( private fun initView(){ val linearLayoutManager = LinearLayoutManager(context) linearLayoutManager.orientation = LinearLayoutManager.VERTICAL -// linearLayoutManager.stackFromEnd = true -// linearLayoutManager.reverseLayout = true passengerMsgBoxBubbleAdapter = PassengerMsgBoxBubbleAdapter(context as Activity) rvPassengerBubbleList.adapter = passengerMsgBoxBubbleAdapter rvPassengerBubbleList.layoutManager = linearLayoutManager diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/adapter/DriverMsgBoxBubbleAdapter.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/adapter/DriverMsgBoxBubbleAdapter.kt index 4a2796dfe6..976daf5d2b 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/adapter/DriverMsgBoxBubbleAdapter.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/msgbox/adapter/DriverMsgBoxBubbleAdapter.kt @@ -10,7 +10,6 @@ import android.widget.TextView import androidx.recyclerview.widget.RecyclerView import com.mogo.eagle.core.data.enums.EventTypeEnum import com.mogo.eagle.core.data.msgbox.* -import com.mogo.eagle.core.data.notice.NoticeNormalData import com.mogo.eagle.core.data.report.ReportEntity import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotManager import com.mogo.eagle.core.function.call.hmi.CallerHmiManager diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_msg_box_video.png b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_msg_box_video.png new file mode 100644 index 0000000000..fa4c8e0e5f Binary files /dev/null and b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable-xhdpi/icon_msg_box_video.png differ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/bg_msg_box_list_p.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/bg_msg_box_list_p.xml new file mode 100644 index 0000000000..0b1a7249a2 --- /dev/null +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/bg_msg_box_list_p.xml @@ -0,0 +1,15 @@ + + + + + + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/msg_box_tips.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/msg_box_tips.xml new file mode 100644 index 0000000000..50d0edef7f --- /dev/null +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/drawable/msg_box_tips.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/fragment_hmi.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/fragment_hmi.xml index e1720c7921..a9a6f19e19 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/fragment_hmi.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/fragment_hmi.xml @@ -216,7 +216,7 @@ android:layout_height="100dp" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintBottom_toBottomOf="parent" - android:layout_marginStart="300dp" + android:layout_marginStart="320dp" android:layout_marginBottom="50dp" android:button="@null" android:background="@drawable/selector_msg_box_p" @@ -226,13 +226,13 @@ @@ -264,6 +264,7 @@ app:layout_constraintBottom_toTopOf="@id/cbMsgBoxPassenger" app:layout_constraintLeft_toLeftOf="@id/cbMsgBoxPassenger" app:layout_constraintRight_toRightOf="@id/cbMsgBoxPassenger" + android:layout_marginBottom="20dp" android:visibility="gone" /> @@ -274,6 +275,7 @@ app:layout_constraintBottom_toTopOf="@id/cbMsgBoxPassenger" app:layout_constraintLeft_toLeftOf="@id/cbMsgBoxPassenger" app:layout_constraintRight_toRightOf="@id/cbMsgBoxPassenger" + android:layout_marginBottom="20dp" android:visibility="gone" /> diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_passenger_msg_box_notice.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_passenger_msg_box_notice.xml index dadb719dc4..8a26d7a513 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_passenger_msg_box_notice.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/item_passenger_msg_box_notice.xml @@ -5,8 +5,8 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:background="#465878" app:roundLayoutRadius="24px" - android:layout_marginTop="10px" - android:layout_marginBottom="10px" + android:layout_marginTop="16px" + android:layout_marginBottom="16px" > + + + app:roundLayoutRadius="24px" + android:layout_marginTop="16px" + android:layout_marginBottom="16px"> - + android:layout_marginBottom="16px">