Merge branch 'dev_robotaxi-d-app-module_2130_221116_2.13.0' into mutidev_robotaxi-d-app-module_2130_221116_2.13.0_multi_display
This commit is contained in:
@@ -301,6 +301,7 @@ class MoGoHmiFragment : MvpFragment<MoGoHmiContract.View?, HmiPresenter?>(),
|
||||
cbMsgBoxDriver.setOnCheckedChangeListener { _, isChecked ->
|
||||
if(isChecked){
|
||||
viewDriverMsgBoxList.visibility = View.VISIBLE
|
||||
viewDriverMsgBoxList.notifyData()
|
||||
viewDriverMsgBoxBubble.visibility = View.GONE
|
||||
CallerHmiManager.updateDriverMsgBoxTipView(false)
|
||||
}else{
|
||||
|
||||
@@ -36,75 +36,25 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
initView()
|
||||
}
|
||||
|
||||
private var noticeList: ArrayList<MsgBoxBean> ?= null
|
||||
private var ipcReportList: ArrayList<MsgBoxBean> ?= null
|
||||
private var badCaseList: ArrayList<MsgBoxBean> ?= null
|
||||
private var driverMsgBoxListAdapter: DriverMsgBoxListAdapter ?=null
|
||||
|
||||
private fun initView() {
|
||||
val driverMsgBoxListAdapter= DriverMsgBoxListAdapter(context as Activity)
|
||||
driverMsgBoxListAdapter= DriverMsgBoxListAdapter(context as Activity)
|
||||
rvMsgBoxList.adapter = driverMsgBoxListAdapter
|
||||
rvMsgBoxList.layoutManager = LinearLayoutManager(context)
|
||||
|
||||
//获取通知消息列表
|
||||
val noticeList: ArrayList<MsgBoxBean>? = CallerMsgBoxManager.getCachedNotifyData() as ArrayList<MsgBoxBean>?
|
||||
noticeList?.addAll(MsgBoxConfig.noticeList)
|
||||
noticeList= CallerMsgBoxManager.getCachedNotifyData() as ArrayList<MsgBoxBean>?
|
||||
noticeList?.reversed()
|
||||
//获取车辆系统信息列表
|
||||
val ipcReportList: ArrayList<MsgBoxBean>? = CallerMsgBoxManager.getCachedSysInfoData() as ArrayList<MsgBoxBean>?
|
||||
ipcReportList?.addAll(MsgBoxConfig.systemInfoList)
|
||||
ipcReportList = CallerMsgBoxManager.getCachedSysInfoData() as ArrayList<MsgBoxBean>?
|
||||
ipcReportList?.reversed()
|
||||
//获取录包信息列表
|
||||
val badCaseList: ArrayList<MsgBoxBean>? = CallerMsgBoxManager.getCachedRecordBagData() as ArrayList<MsgBoxBean>?
|
||||
badCaseList?.addAll(MsgBoxConfig.recordBagList)
|
||||
|
||||
//获取当前Tab选择
|
||||
when(MsgBoxConfig.getUserRecord()){
|
||||
0 ->{
|
||||
tvMsgNotice.setTextColor(resources.getColor(R.color.msg_box_title_color))
|
||||
tvMsgIpcReport.setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
tvMsgBadCase.setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
viewNoticeDivider.visibility = View.VISIBLE
|
||||
viewIpcReportDivider.visibility = View.GONE
|
||||
viewBadCaseDivider.visibility = View.GONE
|
||||
if(noticeList==null){
|
||||
rvMsgBoxList.visibility = View.GONE
|
||||
}else{
|
||||
driverMsgBoxListAdapter.setData(noticeList)
|
||||
rvMsgBoxList.visibility = View.VISIBLE
|
||||
rvMsgBoxList.scrollToPosition(0)
|
||||
}
|
||||
}
|
||||
1 ->{
|
||||
tvMsgNotice.setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
tvMsgIpcReport.setTextColor(resources.getColor(R.color.msg_box_title_color))
|
||||
tvMsgBadCase.setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
viewNoticeDivider.visibility = View.GONE
|
||||
viewIpcReportDivider.visibility = View.VISIBLE
|
||||
viewBadCaseDivider.visibility = View.GONE
|
||||
if(ipcReportList == null){
|
||||
rvMsgBoxList.visibility = View.GONE
|
||||
}else{
|
||||
driverMsgBoxListAdapter.setData(ipcReportList.reversed())
|
||||
rvMsgBoxList.visibility = View.VISIBLE
|
||||
rvMsgBoxList.scrollToPosition(0)
|
||||
}
|
||||
}
|
||||
2 ->{
|
||||
tvMsgNotice.setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
tvMsgIpcReport.setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
tvMsgBadCase.setTextColor(resources.getColor(R.color.msg_box_title_color))
|
||||
viewNoticeDivider.visibility = View.GONE
|
||||
viewIpcReportDivider.visibility = View.GONE
|
||||
viewBadCaseDivider.visibility = View.VISIBLE
|
||||
if(badCaseList == null){
|
||||
rvMsgBoxList.visibility = View.GONE
|
||||
}else{
|
||||
driverMsgBoxListAdapter.setData(badCaseList.reversed())
|
||||
rvMsgBoxList.visibility = View.VISIBLE
|
||||
rvMsgBoxList.scrollToPosition(0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
badCaseList = CallerMsgBoxManager.getCachedRecordBagData() as ArrayList<MsgBoxBean>?
|
||||
badCaseList?.reversed()
|
||||
|
||||
//通知
|
||||
tvMsgNotice.setOnClickListener {
|
||||
@@ -118,7 +68,7 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
if(noticeList==null){
|
||||
rvMsgBoxList.visibility = View.GONE
|
||||
}else{
|
||||
driverMsgBoxListAdapter.setData(noticeList.reversed())
|
||||
driverMsgBoxListAdapter?.setData(noticeList!!)
|
||||
rvMsgBoxList.visibility = View.VISIBLE
|
||||
rvMsgBoxList.scrollToPosition(0)
|
||||
}
|
||||
@@ -136,7 +86,7 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
if(ipcReportList == null){
|
||||
rvMsgBoxList.visibility = View.GONE
|
||||
}else{
|
||||
driverMsgBoxListAdapter.setData(ipcReportList.reversed())
|
||||
driverMsgBoxListAdapter?.setData(ipcReportList!!)
|
||||
rvMsgBoxList.visibility = View.VISIBLE
|
||||
rvMsgBoxList.scrollToPosition(0)
|
||||
}
|
||||
@@ -154,7 +104,7 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
if(badCaseList == null){
|
||||
rvMsgBoxList.visibility = View.GONE
|
||||
}else{
|
||||
driverMsgBoxListAdapter.setData(badCaseList.reversed())
|
||||
driverMsgBoxListAdapter?.setData(badCaseList!!)
|
||||
rvMsgBoxList.visibility = View.VISIBLE
|
||||
rvMsgBoxList.scrollToPosition(0)
|
||||
}
|
||||
@@ -162,4 +112,65 @@ class DriverMsgBoxListView @JvmOverloads constructor(
|
||||
|
||||
}
|
||||
|
||||
fun notifyData(){
|
||||
val localNoticeList = MsgBoxConfig.noticeList.reversed()
|
||||
noticeList?.addAll(0,localNoticeList)
|
||||
val localSysInfoList = MsgBoxConfig.systemInfoList.reversed()
|
||||
ipcReportList?.addAll(0,localSysInfoList)
|
||||
val localRecordList = MsgBoxConfig.recordBagList.reversed()
|
||||
badCaseList?.addAll(0,localRecordList)
|
||||
|
||||
//获取当前Tab选择
|
||||
when(MsgBoxConfig.getUserRecord()){
|
||||
0 ->{
|
||||
tvMsgNotice.setTextColor(resources.getColor(R.color.msg_box_title_color))
|
||||
tvMsgIpcReport.setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
tvMsgBadCase.setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
viewNoticeDivider.visibility = View.VISIBLE
|
||||
viewIpcReportDivider.visibility = View.GONE
|
||||
viewBadCaseDivider.visibility = View.GONE
|
||||
if(noticeList==null){
|
||||
rvMsgBoxList.visibility = View.GONE
|
||||
}else{
|
||||
driverMsgBoxListAdapter?.setData(noticeList!!)
|
||||
rvMsgBoxList.visibility = View.VISIBLE
|
||||
rvMsgBoxList.scrollToPosition(0)
|
||||
}
|
||||
}
|
||||
1 ->{
|
||||
tvMsgNotice.setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
tvMsgIpcReport.setTextColor(resources.getColor(R.color.msg_box_title_color))
|
||||
tvMsgBadCase.setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
viewNoticeDivider.visibility = View.GONE
|
||||
viewIpcReportDivider.visibility = View.VISIBLE
|
||||
viewBadCaseDivider.visibility = View.GONE
|
||||
if(ipcReportList == null){
|
||||
rvMsgBoxList.visibility = View.GONE
|
||||
}else{
|
||||
driverMsgBoxListAdapter?.setData(ipcReportList!!)
|
||||
rvMsgBoxList.visibility = View.VISIBLE
|
||||
rvMsgBoxList.scrollToPosition(0)
|
||||
}
|
||||
}
|
||||
2 ->{
|
||||
tvMsgNotice.setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
tvMsgIpcReport.setTextColor(resources.getColor(R.color.color_FFFFFF))
|
||||
tvMsgBadCase.setTextColor(resources.getColor(R.color.msg_box_title_color))
|
||||
viewNoticeDivider.visibility = View.GONE
|
||||
viewIpcReportDivider.visibility = View.GONE
|
||||
viewBadCaseDivider.visibility = View.VISIBLE
|
||||
if(badCaseList == null){
|
||||
rvMsgBoxList.visibility = View.GONE
|
||||
}else{
|
||||
driverMsgBoxListAdapter?.setData(badCaseList!!)
|
||||
rvMsgBoxList.visibility = View.VISIBLE
|
||||
rvMsgBoxList.scrollToPosition(0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
android:layout_width="804px"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#1B2966"
|
||||
android:background="#1A2344"
|
||||
app:roundLayoutRadius="24px"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="30px"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
android:layout_width="804px"
|
||||
android:layout_height="160px"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#1B2966"
|
||||
android:background="#1A2344"
|
||||
app:roundLayoutRadius="24px"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="30px"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
android:layout_width="804px"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#1B2966"
|
||||
android:background="#1A2344"
|
||||
app:roundLayoutRadius="24px"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="30px"
|
||||
@@ -119,7 +119,8 @@
|
||||
app:layout_constraintLeft_toLeftOf="@id/ivOperationImageOpen"
|
||||
app:layout_constraintRight_toRightOf="@id/tvOperationStatusSelect"
|
||||
android:gravity="start"
|
||||
android:layout_margin="20px"
|
||||
android:layout_marginTop="15px"
|
||||
android:layout_marginBottom="15px"
|
||||
android:textColor="#B3FFFFFF"
|
||||
android:textSize="28px"
|
||||
android:visibility="gone"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
android:layout_width="804px"
|
||||
android:layout_height="160px"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#1B2966"
|
||||
android:background="#1A2344"
|
||||
app:roundLayoutRadius="24px"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="30px"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
android:layout_width="804px"
|
||||
android:layout_height="160px"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#1B2966"
|
||||
android:background="#1A2344"
|
||||
app:roundLayoutRadius="24px"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="30px"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
android:layout_width="804px"
|
||||
android:layout_height="160px"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#1B2966"
|
||||
android:background="#1A2344"
|
||||
app:roundLayoutRadius="24px"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginStart="30px"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
android:layout_width="864px"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#3C4783"
|
||||
android:background="#2E3868"
|
||||
app:roundLayoutRadius="40px">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
android:layout_width="864px"
|
||||
android:layout_height="746px"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:background="#3C4783"
|
||||
android:background="#2E3868"
|
||||
app:roundLayoutRadius="40px">
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -54,6 +54,7 @@ import java.util.Map;
|
||||
|
||||
import ch.hsr.geohash.GeoHash;
|
||||
import kotlin.Pair;
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils;
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
/**
|
||||
@@ -270,7 +271,7 @@ public class AMapCustomView
|
||||
LatLng latLng = new LatLng(center.getLat(),
|
||||
center.getLon());
|
||||
markerOption.position(latLng);
|
||||
markerOption.icon(BitmapDescriptorFactory.fromResource(R.drawable.icon_small_v2x_road_construction));
|
||||
markerOption.icon(BitmapDescriptorFactory.fromBitmap(getV2XBitmap()));
|
||||
markerOptionsList.add(markerOption);
|
||||
}
|
||||
}
|
||||
@@ -292,6 +293,16 @@ public class AMapCustomView
|
||||
});
|
||||
}
|
||||
|
||||
private Bitmap getV2XBitmap() {
|
||||
V2XMarkerView marker = new V2XMarkerView(getContext());
|
||||
marker.measure(View.MeasureSpec.makeMeasureSpec(AutoSizeUtils.dp2px(mContext, 229), View.MeasureSpec.EXACTLY),
|
||||
View.MeasureSpec.makeMeasureSpec(AutoSizeUtils.dp2px(mContext, 96), View.MeasureSpec.EXACTLY));
|
||||
marker.layout(0, 0, marker.getMeasuredWidth(), marker.getMeasuredHeight());
|
||||
Bitmap bitmap = Bitmap.createBitmap(marker.getWidth(), marker.getHeight(), Bitmap.Config.ARGB_8888);
|
||||
marker.draw(new Canvas(bitmap));
|
||||
return bitmap;
|
||||
}
|
||||
|
||||
public void clearV2XMarkers() {
|
||||
if (currMarkerList != null) {
|
||||
for (Marker marker : currMarkerList) {
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.mogo.eagle.core.function.smp
|
||||
|
||||
import android.content.Context
|
||||
import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.function.map.R
|
||||
import kotlinx.android.synthetic.main.view_maker_with_count.view.*
|
||||
|
||||
class V2XMarkerView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout (
|
||||
context,
|
||||
attrs,
|
||||
defStyleAttr
|
||||
) {
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.layout_v2x_maker, this, true)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="229dp"
|
||||
android:layout_height="96dp"
|
||||
android:background="@drawable/icon_v2x_marker"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivIcon"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="64dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginStart="11dp"
|
||||
android:background="@drawable/icon_small_v2x_road_construction"
|
||||
android:visibility="visible"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv"
|
||||
android:layout_width="119dp"
|
||||
android:layout_height="35dp"
|
||||
android:text="道路施工"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_marginTop="23dp"
|
||||
android:layout_marginEnd="23dp"
|
||||
android:textColor="@color/white"
|
||||
android:gravity="center"
|
||||
android:textSize="29dp"
|
||||
tools:text="道路施工"
|
||||
/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 5.4 KiB |
Reference in New Issue
Block a user