完成基础的弹窗绘制线的功能

This commit is contained in:
董宏宇
2021-04-01 18:39:42 +08:00
parent bac9d5a9d0
commit e47736afd9
12 changed files with 88 additions and 97 deletions

View File

@@ -16,7 +16,7 @@ import com.mogo.module.v2x.scenario.scene.livecar.V2XPushLiveCarScenario;
import com.mogo.module.v2x.scenario.scene.livecar.V2XVoiceCallLiveScenario;
import com.mogo.module.v2x.scenario.scene.park.V2XIllegalParkScenario;
import com.mogo.module.v2x.scenario.scene.push.V2XPushEventScenario;
import com.mogo.module.v2x.scenario.scene.pushVR.V2XPushVREventScenario;
import com.mogo.module.v2x.scenario.scene.route.V2XOptimalRouteVREventScenario;
import com.mogo.module.v2x.scenario.scene.road.V2XRoadEventScenario;
import com.mogo.module.v2x.scenario.scene.seek.V2XSeekHelpScenario;
import com.mogo.module.v2x.scenario.scene.ugc.V2XEventUgcScenario;
@@ -104,7 +104,9 @@ public class V2XScenarioManager implements IV2XScenarioManager {
mV2XScenario = new V2XRecommendRouteScenario();
break;
case V2XMessageEntity.V2XTypeEnum.ALERT_PUSH_VR_SHOW:
mV2XScenario = new V2XPushVREventScenario();
if (V2XServiceManager.getMoGoStatusManager().isVrMode()) {
mV2XScenario = new V2XOptimalRouteVREventScenario();
}
break;
case V2XMessageEntity.V2XTypeEnum.ALERT_THE_FRONT_CRASH_WARNING_TOP:
case V2XMessageEntity.V2XTypeEnum.ALERT_THE_FRONT_CRASH_WARNING_LEFT:

View File

@@ -14,16 +14,7 @@ import com.mogo.module.v2x.voice.V2XVoiceManager;
import com.mogo.service.entrance.ButtonIndex;
/**
* @ProjectName: MoGoModulSafeDriving
* @Package: com.mogo.module.v2x.scenario.view
* @ClassName: V2XRoadEventButton
* @Description: 道路实况按钮
* @Author: fenghl
* @CreateDate: 2020/5/18 10:46
* @UpdateUser: 更新者:
* @UpdateDate: 2020/5/18 10:46
* @UpdateRemark: 更新说明:
* @Version: 1.0
* 道路实况按钮
*/
public class V2XRoadEventButton implements IV2XButton {
private TextView tv;

View File

@@ -6,16 +6,7 @@ import com.mogo.module.v2x.scenario.view.IV2XMarker;
import com.mogo.module.v2x.utils.MarkerUtils;
/**
* @ProjectName: MoGoModulSafeDriving
* @Package: com.mogo.module.v2x.scenario.view
* @ClassName: V2XRoadEventMarker
* @Description: java类作用描述
* @Author: fenghl
* @CreateDate: 2020/5/18 10:48
* @UpdateUser: 更新者:
* @UpdateDate: 2020/5/18 10:48
* @UpdateRemark: 更新说明:
* @Version: 1.0
* 道路V2X事件的Marker
*/
public class V2XRoadEventMarker implements IV2XMarker<V2XRoadEventEntity> {
@Override

View File

@@ -1,4 +1,4 @@
package com.mogo.module.v2x.scenario.scene.pushVR;
package com.mogo.module.v2x.scenario.scene.route;
import com.mogo.map.overlay.IMogoPolyline;
import com.mogo.map.overlay.MogoPolylineOptions;
@@ -19,7 +19,7 @@ import java.util.List;
* desc : 推送VR场景
* version: 1.0
*/
public class V2XPushVREventMarker implements IV2XMarker<V2XPushMessageEntity> {
public class V2XOptimalRouteVREventMarker implements IV2XMarker<V2XPushMessageEntity> {
private final String TAG = "V2XPushVREventMarker";
private static IMogoPolyline mMogoPolyline;
@@ -59,7 +59,7 @@ public class V2XPushVREventMarker implements IV2XMarker<V2XPushMessageEntity> {
colors.add(0xFFCB253A);
// 线条粗细渐变渐变色值
options.width(15).useGradient(true).color(0xFFF95959);
options.width(30).useGradient(true).colorValues(colors);
for (double[] doubles : entity.getRecommendPolyline()) {
options.add(doubles[0], doubles[1]);

View File

@@ -1,4 +1,4 @@
package com.mogo.module.v2x.scenario.scene.pushVR;
package com.mogo.module.v2x.scenario.scene.route;
import android.view.View;
import android.view.ViewGroup;
@@ -20,17 +20,18 @@ import com.mogo.utils.network.utils.GsonUtil;
* author : donghongyu
* e-mail : 1358506549@qq.com
* date : 2020/5/15 5:37 PM
* desc : 推送VR场景控制
* desc : 最优车道选择
* version: 1.0
* wiki : http://wiki.zhidaohulian.com/pages/viewpage.action?pageId=52829799
*/
public class V2XPushVREventScenario
public class V2XOptimalRouteVREventScenario
extends AbsV2XScenario<V2XPushMessageEntity>
implements IMogoTopViewStatusListener {
private String TAG = "V2XPushVREventWindow";
public V2XPushVREventScenario() {
setV2XMarker(new V2XPushVREventMarker());
setV2XWindow(new V2XPushVREventWindow());
public V2XOptimalRouteVREventScenario() {
setV2XMarker(new V2XOptimalRouteVREventMarker());
setV2XWindow(new V2XOptimalRouteVREventWindow());
}
@Override

View File

@@ -1,4 +1,4 @@
package com.mogo.module.v2x.scenario.scene.pushVR;
package com.mogo.module.v2x.scenario.scene.route;
import android.content.Context;
import android.os.Handler;
@@ -24,7 +24,7 @@ import static com.mogo.module.v2x.V2XConst.MODULE_NAME;
* TODO 只有VR演示场景使用
* version: 1.0
*/
public class V2XPushVREventWindow extends V2XBasWindow implements IV2XWindow<V2XPushMessageEntity> {
public class V2XOptimalRouteVREventWindow extends V2XBasWindow implements IV2XWindow<V2XPushMessageEntity> {
private String TAG = "V2XPushVREventWindow";
// 处理道路事件30秒倒计时
@@ -32,24 +32,22 @@ public class V2XPushVREventWindow extends V2XBasWindow implements IV2XWindow<V2X
private Runnable runnableV2XEvent;
private int mExpireTime = 30000;
public V2XPushVREventWindow() {
public V2XOptimalRouteVREventWindow() {
this(V2XServiceManager.getContext());
}
public V2XPushVREventWindow(Context context) {
public V2XOptimalRouteVREventWindow(Context context) {
this(context, null);
}
public V2XPushVREventWindow(Context context, AttributeSet attrs) {
public V2XOptimalRouteVREventWindow(Context context, AttributeSet attrs) {
this(V2XServiceManager.getContext(), null, 0);
}
public V2XPushVREventWindow(Context context, AttributeSet attrs, int defStyleAttr) {
public V2XOptimalRouteVREventWindow(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
// 填充布局
LayoutInflater.from(context).inflate(V2XServiceManager.getMoGoStatusManager().isVrMode() ?
R.layout.window_road_event_detail_vr : R.layout.window_road_event_detail, this);
LayoutInflater.from(context).inflate(R.layout.vr_window_top_tips, this);
}
/**