[2.13.0]消息盒子
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
// }
|
||||
|
||||
}
|
||||
@@ -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<MsgBoxBean>?
|
||||
noticeList?.reversed()
|
||||
noticeList = noticeList?.reversed() as ArrayList<MsgBoxBean>?
|
||||
//获取车辆系统信息列表
|
||||
ipcReportList = CallerMsgBoxManager.getCachedSysInfoData() as ArrayList<MsgBoxBean>?
|
||||
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选择
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 504 B |
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
|
||||
<gradient
|
||||
android:startColor="#31486E"
|
||||
android:endColor="#223554"
|
||||
android:type="linear"
|
||||
android:angle="270"
|
||||
/>
|
||||
<size android:height="750px"
|
||||
android:width="650px"
|
||||
/>
|
||||
|
||||
</shape>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval"
|
||||
android:useLevel="false">
|
||||
<solid android:color="#FFEE2A2A" />
|
||||
|
||||
<size
|
||||
android:width="20px"
|
||||
android:height="20px" />
|
||||
</shape>
|
||||
@@ -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 @@
|
||||
<!--乘客端消息提示-->
|
||||
<View
|
||||
android:id="@+id/MsgBoxPTipView"
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="8dp"
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:background="@drawable/version_upgrade_tips_background"
|
||||
android:translationZ="30dp"
|
||||
app:layout_constraintCircle="@id/cbMsgBoxPassenger"
|
||||
app:layout_constraintCircleAngle="40"
|
||||
app:layout_constraintCircleRadius="32dp"
|
||||
app:layout_constraintCircleRadius="50dp"
|
||||
tools:ignore="MissingConstraints"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
@@ -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"
|
||||
/>
|
||||
|
||||
|
||||
@@ -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"
|
||||
>
|
||||
|
||||
<ImageView
|
||||
@@ -32,6 +32,16 @@
|
||||
app:layout_constraintBottom_toTopOf="@id/tvPassengerNoticeContent"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="25px"
|
||||
android:layout_height="23px"
|
||||
app:layout_constraintTop_toTopOf="@id/tvPassengerNoticeTitle"
|
||||
app:layout_constraintBottom_toBottomOf="@id/tvPassengerNoticeTitle"
|
||||
app:layout_constraintLeft_toRightOf="@id/tvPassengerNoticeTitle"
|
||||
android:layout_marginStart="10px"
|
||||
android:src="@drawable/icon_msg_box_video"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPassengerNoticeContent"
|
||||
android:layout_width="0dp"
|
||||
|
||||
@@ -4,7 +4,9 @@
|
||||
android:layout_height="160px"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#465878"
|
||||
app:roundLayoutRadius="24px">
|
||||
app:roundLayoutRadius="24px"
|
||||
android:layout_marginTop="16px"
|
||||
android:layout_marginBottom="16px">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivPassengerV2XImage"
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.mogo.eagle.core.widget.RoundConstraintLayout
|
||||
android:layout_width="650px"
|
||||
android:layout_height="750px"
|
||||
android:background="@drawable/bg_msg_box_list_p"
|
||||
app:roundLayoutRadius="40px"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#31486E"
|
||||
app:roundLayoutRadius="40px">
|
||||
android:layout_marginBottom="16px">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rvPassengerList"
|
||||
|
||||
Reference in New Issue
Block a user