Merge remote-tracking branch 'origin/dev_1.1.9' into dev_1.1.9
This commit is contained in:
@@ -2,9 +2,12 @@ package com.mogo.module.v2x.adapter.holder;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
@@ -13,6 +16,7 @@ import android.widget.TextView;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.request.RequestOptions;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.module.common.animation.BezierAnimationView;
|
||||
import com.mogo.module.common.entity.MarkerExploreWay;
|
||||
import com.mogo.module.common.entity.MarkerUserInfo;
|
||||
import com.mogo.module.common.entity.V2XEventShowEntity;
|
||||
@@ -76,6 +80,8 @@ public class V2XRoadEventVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
private ImageView ivEventReportErr;
|
||||
private HeartLikeView ivEventZan;
|
||||
|
||||
private ViewGroup mViewGroup;
|
||||
|
||||
|
||||
// 上传事件的用户信息
|
||||
private MarkerUserInfo mUserInfo;
|
||||
@@ -148,6 +154,7 @@ public class V2XRoadEventVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.item_v2x_event_detail, viewGroup, false)
|
||||
, v2XWindow);
|
||||
mContext = viewGroup.getContext();
|
||||
mViewGroup = viewGroup;
|
||||
init(itemView);
|
||||
// 设置视图状态监听
|
||||
itemView.addOnAttachStateChangeListener(new View.OnAttachStateChangeListener() {
|
||||
@@ -305,7 +312,7 @@ public class V2XRoadEventVH extends V2XBaseViewHolder<V2XEventShowEntity> {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 展示事件的图片/视频资源
|
||||
* */
|
||||
|
||||
@@ -111,19 +111,19 @@ public class V2XAlarmServer {
|
||||
}
|
||||
// 进行提醒
|
||||
if (!isAlreadyAlert) {
|
||||
Logger.w(MODULE_NAME, "V2X预警--车辆与事件信息:" +
|
||||
"\n事件详情ID:" + v2XRoadEventEntity.getNoveltyInfo().getInfoId() +
|
||||
"\n事件详情:" + GsonUtil.jsonFromObject(v2XRoadEventEntity.getNoveltyInfo()) +
|
||||
"\n距离:" + v2XRoadEventEntity.getDistance() + "米" +
|
||||
"\n是否已经提醒:" + isAlreadyAlert +
|
||||
"\n当前车辆-经度:" + currentLocation.getLongitude() +
|
||||
"\n当前车辆-经度:" + currentLocation.getLatitude() +
|
||||
"\n当前车辆-角度:" + currentLocation.getBearing() +
|
||||
"\n道路事件-经度:" + eventLocation.getLon() +
|
||||
"\n道路事件-经度:" + eventLocation.getLat() +
|
||||
"\n道路事件-角度:" + eventLocation.getAngle() +
|
||||
"\n夹角角度:" + eventAngle + " 度"
|
||||
);
|
||||
// Logger.w(MODULE_NAME, "V2X预警--车辆与事件信息:" +
|
||||
// "\n事件详情ID:" + v2XRoadEventEntity.getNoveltyInfo().getInfoId() +
|
||||
// "\n事件详情:" + GsonUtil.jsonFromObject(v2XRoadEventEntity.getNoveltyInfo()) +
|
||||
// "\n距离:" + v2XRoadEventEntity.getDistance() + "米" +
|
||||
// "\n是否已经提醒:" + isAlreadyAlert +
|
||||
// "\n当前车辆-经度:" + currentLocation.getLongitude() +
|
||||
// "\n当前车辆-经度:" + currentLocation.getLatitude() +
|
||||
// "\n当前车辆-角度:" + currentLocation.getBearing() +
|
||||
// "\n道路事件-经度:" + eventLocation.getLon() +
|
||||
// "\n道路事件-经度:" + eventLocation.getLat() +
|
||||
// "\n道路事件-角度:" + eventLocation.getAngle() +
|
||||
// "\n夹角角度:" + eventAngle + " 度"
|
||||
// );
|
||||
mAlertRoadEventList.put(v2XRoadEventEntity, TimeUtils.getNowString());
|
||||
return v2XRoadEventEntity;
|
||||
}
|
||||
@@ -141,13 +141,13 @@ public class V2XAlarmServer {
|
||||
// );
|
||||
}
|
||||
} else {
|
||||
Logger.w(MODULE_NAME,
|
||||
"V2X预警--车头方向与事件方向角度不一致:" +
|
||||
"\n事件详情:" + v2XRoadEventEntity.getNoveltyInfo().getInfoId() +
|
||||
"\n车头方向: " + carBearing +
|
||||
"\n事件方向:" + eventBearing +
|
||||
"\n角度差值:" + diffAngle
|
||||
);
|
||||
// Logger.w(MODULE_NAME,
|
||||
// "V2X预警--车头方向与事件方向角度不一致:" +
|
||||
// "\n事件详情:" + v2XRoadEventEntity.getNoveltyInfo().getInfoId() +
|
||||
// "\n车头方向: " + carBearing +
|
||||
// "\n事件方向:" + eventBearing +
|
||||
// "\n角度差值:" + diffAngle
|
||||
// );
|
||||
}
|
||||
} else {
|
||||
// Logger.w(MODULE_NAME, "V2X预警--车辆距离事件距离大于500米了:" +
|
||||
@@ -156,10 +156,10 @@ public class V2XAlarmServer {
|
||||
// );
|
||||
}
|
||||
} else {
|
||||
Logger.e(MODULE_NAME,
|
||||
"V2X预警--道路事件没有角度信息" +
|
||||
"\n事件详情:" + v2XRoadEventEntity.getNoveltyInfo().getInfoId()
|
||||
);
|
||||
// Logger.e(MODULE_NAME,
|
||||
// "V2X预警--道路事件没有角度信息" +
|
||||
// "\n事件详情:" + v2XRoadEventEntity.getNoveltyInfo().getInfoId()
|
||||
// );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,6 +60,7 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
|
||||
private static CopyOnWriteArraySet<V2XRoadEventEntity> mV2XRoadEventEntityArrayList = new CopyOnWriteArraySet<>();
|
||||
// 上次的道路事件的预警Marker
|
||||
private static IMogoMarker mAlarmInfoMarker;
|
||||
|
||||
@Override
|
||||
public void drawableLastAllPOI() {
|
||||
//Logger.w(MODULE_NAME, "V2X---绘制上一次的POI,回调给Launcher底层逻辑让其进行绘制");
|
||||
@@ -257,19 +258,20 @@ public class MoGoV2XMarkerManager implements IMoGoV2XMarkerManager {
|
||||
.longitude(roadEventEntity.getLocation().getLon());
|
||||
optionsRipple.anchor(0.5f, 0.5f);
|
||||
|
||||
// 由于性能问题,D车机不使用事件扩散动画
|
||||
//由于性能问题,D车机不使用事件扩散动画
|
||||
//showInfoWindow只支持添加单个marker,不支持帧动画
|
||||
if (!CarSeries.isF8xxSeries()) {
|
||||
optionsRipple.icon(V2XMarkerAdapter.getV2XRoadEventViewPng(context, roadEventEntity));
|
||||
if (V2XServiceManager.getMoGoStatusManager().isVrMode()) {
|
||||
mAlarmInfoMarker = MarkerDrawer.getInstance().drawMapMarkerImpl(markerShowEntity, MarkerDrawer.MARKER_Z_INDEX_HIGH, null);
|
||||
mAlarmInfoMarker.setInfoWindowAdapter(new RoadConditionInfoWindow3DAdapter(markerShowEntity, AbsMogoApplication.getApp(), mAlarmInfoMarker.getMogoMarkerOptions()));
|
||||
mAlarmInfoMarker.showInfoWindow();
|
||||
} else {
|
||||
mAlarmInfoMarker = V2XServiceManager.getMarkerManager().addMarker(V2X_EVENT_ALARM_POI, optionsRipple);
|
||||
}
|
||||
} else {
|
||||
optionsRipple.icons(V2XMarkerAdapter.getV2XRoadEventViewGif(context, roadEventEntity));
|
||||
optionsRipple.period(1);
|
||||
}
|
||||
if (V2XServiceManager.getMoGoStatusManager().isVrMode()) {
|
||||
mAlarmInfoMarker = MarkerDrawer.getInstance().drawMapMarkerImpl(markerShowEntity, MarkerDrawer.MARKER_Z_INDEX_HIGH, null);
|
||||
mAlarmInfoMarker.setInfoWindowAdapter(new RoadConditionInfoWindow3DAdapter(markerShowEntity, AbsMogoApplication.getApp(), mAlarmInfoMarker.getMogoMarkerOptions()));
|
||||
mAlarmInfoMarker.showInfoWindow();
|
||||
} else{
|
||||
// optionsRipple.icon(V2XMarkerAdapter.getV2XRoadEventViewPng(context, roadEventEntity));
|
||||
optionsRipple.period(100);
|
||||
mAlarmInfoMarker = V2XServiceManager.getMarkerManager().addMarker(V2X_EVENT_ALARM_POI, optionsRipple);
|
||||
}
|
||||
// 当前Marker设置为最上面
|
||||
|
||||
Reference in New Issue
Block a user