diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 8853517620..77f6cae560 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -79,6 +79,7 @@
+
diff --git a/.idea/misc.xml b/.idea/misc.xml
index cd77a1f062..a2da5c6cd8 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -4,7 +4,7 @@
-
+
\ No newline at end of file
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerExploreWay.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerExploreWay.java
index 4fbbc9dd44..c4fbbb8f74 100644
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerExploreWay.java
+++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerExploreWay.java
@@ -30,6 +30,10 @@ public class MarkerExploreWay implements Serializable {
//上报类型:1-用户上报,2-后台上报 3-三方上报
private String uploadType;
+ // http://wiki.zhidaohulian.com/pages/viewpage.action?pageId=42321443
+ // 1 需要用户判断是否拥堵 进行UGC问答
+ private int infoCheckNode;
+
public String getAddr() {
if (TextUtils.isEmpty(addr)) {
return "未知道路";
@@ -171,11 +175,27 @@ public class MarkerExploreWay implements Serializable {
return Objects.hash(infoId, type, poiType);
}
+ public boolean isCanLive() {
+ return canLive;
+ }
+
+ public void setGenerateTime(long generateTime) {
+ this.generateTime = generateTime;
+ }
+
+ public int getInfoCheckNode() {
+ return infoCheckNode;
+ }
+
+ public void setInfoCheckNode(int infoCheckNode) {
+ this.infoCheckNode = infoCheckNode;
+ }
+
@Override
public String toString() {
return "MarkerExploreWay{" +
- "type='" + type + '\'' +
- ", infoId='" + infoId + '\'' +
+ "infoId='" + infoId + '\'' +
+ ", type='" + type + '\'' +
", poiType='" + poiType + '\'' +
", sn='" + sn + '\'' +
", location=" + location +
@@ -189,6 +209,7 @@ public class MarkerExploreWay implements Serializable {
", userInfo=" + userInfo +
", items=" + items +
", uploadType='" + uploadType + '\'' +
+ ", infoCheckNode=" + infoCheckNode +
'}';
}
}
diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XMessageEntity.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XMessageEntity.java
index 98f567ac0b..04563ff2b9 100644
--- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XMessageEntity.java
+++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/V2XMessageEntity.java
@@ -137,6 +137,8 @@ public class V2XMessageEntity implements Serializable {
int ALERT_ROAD_LIVE_CAR_WARNING = 1_007;
// 道路事件违章停车
int ALERT_ILLEGAL_PARK_WARNING = 1_008;
+ // 用户UGC反馈事件准确性弹窗
+ int ALERT_EVENT_UGC_WARNING = 1_009;
// 自车求助
int ALERT_CAR_FOR_HELP = 8_000;
}
@@ -151,6 +153,7 @@ public class V2XMessageEntity implements Serializable {
V2XTypeEnum.ALERT_ANIMATION_WARNING,
V2XTypeEnum.ALERT_ROAD_LIVE_CAR_WARNING,
V2XTypeEnum.ALERT_ILLEGAL_PARK_WARNING,
+ V2XTypeEnum.ALERT_EVENT_UGC_WARNING,
V2XTypeEnum.ALERT_CAR_FOR_HELP,
})
@Target({
diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/adapter/V2XRoadEventAdapter.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/adapter/V2XRoadEventAdapter.java
index 6bb1b00400..5c0bc485a3 100644
--- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/adapter/V2XRoadEventAdapter.java
+++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/adapter/V2XRoadEventAdapter.java
@@ -7,6 +7,7 @@ import androidx.recyclerview.widget.RecyclerView;
import com.mogo.module.common.entity.V2XEventShowEntity;
import com.mogo.module.common.entity.V2XMessageEntity;
+import com.mogo.module.v2x.adapter.holder.V2XEventUgcVH;
import com.mogo.module.v2x.adapter.holder.V2XFatigueDrivingVH;
import com.mogo.module.v2x.adapter.holder.V2XIllegalParkVH;
import com.mogo.module.v2x.adapter.holder.V2XLiveVideoVH;
@@ -34,7 +35,7 @@ public class V2XRoadEventAdapter extends RecyclerView.Adapter {
+
+ public V2XEventUgcVH(ViewGroup viewGroup) {
+ super(LayoutInflater.from(viewGroup.getContext())
+ .inflate(R.layout.item_v2x_event_ugc, viewGroup, false));
+
+ }
+
+ @Override
+ public void initView(V2XEventShowEntity v2XEventShowEntity) {
+
+ }
+
+ /**
+ * 延迟关闭窗体
+ */
+ @Override
+ public void delayedCloseWindow() {
+ itemView.postDelayed(() -> V2XFatigueDrivingScenario.getInstance().close(), 1000);
+ }
+
+}
diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/impl/V2XScenarioManager.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/impl/V2XScenarioManager.java
index 1129944f32..86f303b9a6 100644
--- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/impl/V2XScenarioManager.java
+++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/impl/V2XScenarioManager.java
@@ -16,6 +16,7 @@ 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.road.V2XRoadEventScenario;
import com.mogo.module.v2x.scenario.scene.seek.V2XSeekHelpScenario;
+import com.mogo.module.v2x.scenario.scene.ugc.V2XEventUgcScenario;
import com.mogo.module.v2x.utils.V2XUtils;
import com.mogo.utils.TipToast;
import com.mogo.utils.logger.Logger;
@@ -95,6 +96,9 @@ public class V2XScenarioManager implements IV2XScenarioManager {
case V2XMessageEntity.V2XTypeEnum.ALERT_ILLEGAL_PARK_WARNING:
mV2XScenario = V2XIllegalParkScenario.getInstance();
break;
+ case V2XMessageEntity.V2XTypeEnum.ALERT_EVENT_UGC_WARNING:
+ mV2XScenario = V2XEventUgcScenario.getInstance();
+ break;
default:
Logger.e(MODULE_NAME, "当前V2X消息类型未定义。");
TipToast.tip("当前V2X消息类型未定义");
diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/test/V2XTestConsoleWindow.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/test/V2XTestConsoleWindow.java
index f1ad2a1afc..f0633ddbd8 100644
--- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/test/V2XTestConsoleWindow.java
+++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/test/V2XTestConsoleWindow.java
@@ -4,6 +4,7 @@ import android.content.Context;
import android.content.Intent;
import android.util.AttributeSet;
import android.view.LayoutInflater;
+import android.view.View;
import android.widget.Button;
import androidx.constraintlayout.widget.ConstraintLayout;
@@ -48,6 +49,7 @@ public class V2XTestConsoleWindow extends ConstraintLayout {
private Button mBtnTriggerFatigueDrivingEvent;
private Button mBtnTriggerSeekHelpEvent;
private Button mBtnTriggerParkEvent;
+ private Button mBtnTriggerEventUgc;
private Button mBtnTriggerCallUserInfo;
public static V2XTestConsoleWindow getInstance(Context context) {
@@ -87,6 +89,7 @@ public class V2XTestConsoleWindow extends ConstraintLayout {
mBtnTriggerFatigueDrivingEvent = findViewById(R.id.btnTriggerFatigueDrivingEvent);
mBtnTriggerSeekHelpEvent = findViewById(R.id.btnTriggerSeekHelpEvent);
mBtnTriggerParkEvent = findViewById(R.id.btnTriggerParkEvent);
+ mBtnTriggerEventUgc = findViewById(R.id.btnTriggerEventUgc);
mBtnTriggerCallUserInfo = findViewById(R.id.btnTriggerCallUserInfo);
mBtnTriggerCallUserInfo.setOnClickListener(v -> {
@@ -96,7 +99,7 @@ public class V2XTestConsoleWindow extends ConstraintLayout {
mogoDriverInfo.setSn("12345678");
mogoDriverInfo.setUserName("测试");
mogoDriverInfo.setUserHead("https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1600872867592&di=994e371880ca6ae2814f553e0d0e4139&imgtype=0&src=http%3A%2F%2Fp3.ssl.cdn.btime.com%2Ft014c5d8a1e5cef12ba.jpg%3Fsize%3D506x543");
- V2XServiceManager.getCarsChattingProvider().showUserWindow("CAR_CALL_USER_TO_" + V2XConst.MODULE_NAME,mogoDriverInfo,context);
+ V2XServiceManager.getCarsChattingProvider().showUserWindow("CAR_CALL_USER_TO_" + V2XConst.MODULE_NAME, mogoDriverInfo, context);
});
mBtnTriggerOpen.setOnClickListener(v ->
@@ -165,6 +168,17 @@ public class V2XTestConsoleWindow extends ConstraintLayout {
LocalBroadcastManager.getInstance(getContext()).sendBroadcast(intent);
});
+ mBtnTriggerEventUgc.setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ V2XMessageEntity v2XMessageEntity =
+ TestOnLineCarUtils.getV2XScenarioRoadEventUGCData();
+
+ Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION);
+ intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity);
+ LocalBroadcastManager.getInstance(getContext()).sendBroadcast(intent);
+ }
+ });
mBtnTriggerParkEvent.setOnClickListener(v -> {
V2XMessageEntity> v2XMessageEntity =
diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/ugc/V2XEventUgcScenario.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/ugc/V2XEventUgcScenario.java
new file mode 100644
index 0000000000..96bd61f965
--- /dev/null
+++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/ugc/V2XEventUgcScenario.java
@@ -0,0 +1,131 @@
+package com.mogo.module.v2x.scenario.scene.ugc;
+
+import android.view.View;
+import android.view.ViewGroup;
+
+import androidx.annotation.Nullable;
+
+import com.mogo.module.common.entity.V2XMessageEntity;
+import com.mogo.module.common.entity.V2XRoadEventEntity;
+import com.mogo.module.v2x.R;
+import com.mogo.module.v2x.V2XConst;
+import com.mogo.module.v2x.V2XServiceManager;
+import com.mogo.module.v2x.scenario.impl.AbsV2XScenario;
+import com.mogo.module.v2x.utils.V2XUtils;
+import com.mogo.service.windowview.IMogoTopViewStatusListener;
+import com.mogo.utils.logger.Logger;
+
+import static com.mogo.module.v2x.V2XConst.MODULE_NAME;
+
+/**
+ * author : donghongyu
+ * e-mail : 1358506549@qq.com
+ * date : 2020/5/15 5:37 PM
+ * desc : 道路事件UGC
+ * 需求地址
+ * http://wiki.zhidaohulian.com/pages/viewpage.action?pageId=42321443
+ * version: 1.0
+ */
+public class V2XEventUgcScenario extends AbsV2XScenario implements IMogoTopViewStatusListener {
+
+ private static V2XEventUgcScenario mV2XTiredScenario;
+
+ private V2XEventUgcScenario() {
+ }
+
+ public static V2XEventUgcScenario getInstance() {
+ if (mV2XTiredScenario == null) {
+ synchronized (V2XEventUgcScenario.class) {
+ if (mV2XTiredScenario == null) {
+ mV2XTiredScenario = new V2XEventUgcScenario();
+ mV2XTiredScenario.setV2XWindow(new V2XEventUgcWindow());
+ }
+ }
+ }
+ return mV2XTiredScenario;
+ }
+
+ @Override
+ public void init(@Nullable V2XMessageEntity v2XMessageEntity) {
+ if (!isSameScenario(v2XMessageEntity)) {
+ setV2XMessageEntity(v2XMessageEntity);
+ if (v2XMessageEntity != null) {
+ if (v2XMessageEntity.isShowState()
+ && V2XServiceManager.getMoGoStatusManager().isMainPageLaunched()) {
+ show();
+ }
+ }
+ } else {
+ setV2XMessageEntity(v2XMessageEntity);
+ Logger.w(V2XConst.MODULE_NAME, "疲劳驾驶场景,要处理的场景已经存在,丢弃这次初始化");
+ }
+ }
+
+ @Override
+ public void show() {
+ showWindow();
+ }
+
+ @Override
+ public void showWindow() {
+ if (getV2XWindow() != null) {
+ ViewGroup.LayoutParams layoutParams =
+ new ViewGroup.LayoutParams(
+ ViewGroup.LayoutParams.MATCH_PARENT,
+ (int) V2XUtils.getApp().getResources().getDimension(R.dimen.module_v2x_fatigue_driving_window_height_ground));
+ V2XServiceManager
+ .getMogoTopViewManager()
+ .addView(getV2XWindow().getView(), layoutParams, this);
+ getV2XWindow().show(getV2XMessageEntity().getContent());
+ V2XServiceManager.getMoGoV2XStatusManager().setFatigueDrivingWindowShow(TAG, true);
+ }
+ }
+
+ @Override
+ public void closeWindow() {
+ if (getV2XWindow() != null) {
+ getV2XWindow().close();
+ }
+ }
+
+ @Override
+ public void showButton() {
+ }
+
+ @Override
+ public void closeButton() {
+ }
+
+ @Override
+ public void drawPOI() {
+ }
+
+ @Override
+ public void clearPOI() {
+ }
+
+ @Override
+ public void onViewAdded(View view) {
+ Logger.d(MODULE_NAME, "疲劳驾驶场景 展示 Window 动画结束");
+ }
+
+ @Override
+ public void onViewRemoved(View view) {
+ Logger.d(MODULE_NAME, "疲劳驾驶场景 关闭 Window 动画结束");
+ }
+
+ @Override
+ public void beforeViewAddAnim(View view) {
+ Logger.d(MODULE_NAME, "疲劳驾驶场景 展示 Window 开始");
+
+ }
+
+ @Override
+ public void beforeViewRemoveAnim(View view) {
+ Logger.d(MODULE_NAME, "疲劳驾驶场景 关闭 Window 开始");
+ // 重置场景提示的消息
+ setV2XMessageEntity(null);
+ V2XServiceManager.getMoGoV2XStatusManager().setFatigueDrivingWindowShow(TAG, false);
+ }
+
+}
diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/ugc/V2XEventUgcWindow.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/ugc/V2XEventUgcWindow.java
new file mode 100644
index 0000000000..8e1c82f927
--- /dev/null
+++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/scenario/scene/ugc/V2XEventUgcWindow.java
@@ -0,0 +1,163 @@
+package com.mogo.module.v2x.scenario.scene.ugc;
+
+import android.content.Context;
+import android.os.Handler;
+import android.util.AttributeSet;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.RelativeLayout;
+
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.PagerSnapHelper;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.mogo.module.common.entity.V2XEventShowEntity;
+import com.mogo.module.common.entity.V2XMessageEntity;
+import com.mogo.module.common.entity.V2XRoadEventEntity;
+import com.mogo.module.v2x.R;
+import com.mogo.module.v2x.V2XServiceManager;
+import com.mogo.module.v2x.adapter.V2XRoadEventAdapter;
+import com.mogo.module.v2x.listener.V2XWindowStatusListener;
+import com.mogo.module.v2x.scenario.view.IV2XWindow;
+import com.mogo.utils.logger.Logger;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import static com.mogo.module.v2x.V2XConst.MODULE_NAME;
+
+/**
+ * author : donghongyu
+ * e-mail : 1358506549@qq.com
+ * date : 2020/4/24 11:34 AM
+ * desc : 道路事件UGC
+ * 需求地址
+ * http://wiki.zhidaohulian.com/pages/viewpage.action?pageId=42321443
+ * version: 1.0
+ */
+public class V2XEventUgcWindow extends RelativeLayout
+ implements IV2XWindow {
+ // 展示列表
+ private RecyclerView mRecyclerView;
+ // 列表数据适配器
+ private V2XRoadEventAdapter mV2XRoadEventAdapter;
+ // 列表展示
+ private List mItemList = new ArrayList<>();
+
+ // 直播30秒自动关闭
+ private static Handler handlerV2XEvent = new Handler();
+ private static Runnable runnableV2XEvent;
+
+ //
+ private V2XRoadEventEntity mV2XRoadEventEntity;
+
+ public V2XEventUgcWindow() {
+ this(V2XServiceManager.getContext(), null);
+ }
+
+ public V2XEventUgcWindow(Context context) {
+ this(context, null);
+ }
+
+ public V2XEventUgcWindow(Context context, AttributeSet attrs) {
+ this(context, attrs, 0);
+ }
+
+ public V2XEventUgcWindow(Context context, AttributeSet attrs, int defStyleAttr) {
+ super(context, attrs, defStyleAttr);
+ initView(context);
+ }
+
+ public void initView(Context context) {
+ Logger.w(MODULE_NAME, "V2X-初始化疲劳驾驶");
+ LayoutInflater.from(context).inflate(R.layout.window_fault_help, this);
+ // 详情列表
+ mRecyclerView = findViewById(R.id.rvRoadEventList);
+ mV2XRoadEventAdapter = new V2XRoadEventAdapter(mItemList);
+ mRecyclerView.setAdapter(mV2XRoadEventAdapter);
+ // 设置切换样式
+ new PagerSnapHelper().attachToRecyclerView(mRecyclerView);
+ // 配置列表朝向
+ LinearLayoutManager layoutManager = new LinearLayoutManager(context, LinearLayoutManager.HORIZONTAL, false);
+ mRecyclerView.setLayoutManager(layoutManager);
+ mRecyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {
+ @Override
+ public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState) {
+ super.onScrollStateChanged(recyclerView, newState);
+ if (recyclerView.getChildCount() > 0) {
+ if (newState == RecyclerView.SCROLL_STATE_IDLE) {
+ // 用户处于交互的时候延后隐藏时间
+ countDownV2XEvent();
+ }
+ }
+ }
+ });
+ }
+
+
+ /**
+ * 展示道路事件详情Windows
+ */
+ @Override
+ public void show(V2XRoadEventEntity entity) {
+ if (entity != null) {
+ mV2XRoadEventEntity = entity;
+ // 清空数据
+ mItemList.clear();
+ //Logger.d(MODULE_NAME, "V2X===推送消息:" + v2XRoadEventEntity);
+ V2XEventShowEntity v2XEventShowEntity = new V2XEventShowEntity();
+ v2XEventShowEntity.setV2XRoadEventEntity(mV2XRoadEventEntity);
+ v2XEventShowEntity.setViewType(V2XMessageEntity.V2XTypeEnum.ALERT_EVENT_UGC_WARNING);
+ mItemList.add(v2XEventShowEntity);
+ // 刷新列表
+ mV2XRoadEventAdapter.notifyDataSetChanged();
+
+ countDownV2XEvent();
+ }
+ }
+
+ @Override
+ public void close() {
+ // 停止倒计时
+ if (handlerV2XEvent != null && runnableV2XEvent != null) {
+ handlerV2XEvent.removeCallbacks(runnableV2XEvent);
+ runnableV2XEvent = null;
+ }
+
+ //移除窗体
+ V2XServiceManager
+ .getMogoTopViewManager()
+ .removeView(this);
+ }
+
+ @Override
+ public View getView() {
+ return this;
+ }
+
+ @Override
+ public void setWindowStatusListener(V2XWindowStatusListener listener) {
+ }
+
+ /**
+ * 窗体倒计时
+ */
+ public void countDownV2XEvent() {
+ if (mV2XRoadEventEntity != null) {
+ // 倒计时
+ if (runnableV2XEvent == null) {
+ runnableV2XEvent = () -> {
+ Logger.d(MODULE_NAME, "V2X=== Window 30秒倒计时结束。。。");
+ // 移出Window详细信息
+ close();
+ };
+ } else {
+ handlerV2XEvent.removeCallbacks(runnableV2XEvent);
+ }
+ int expireTime = mV2XRoadEventEntity.getExpireTime();
+ Logger.d(MODULE_NAME, "V2X=== Window 展示开始倒计时:" + expireTime);
+ handlerV2XEvent.postDelayed(runnableV2XEvent, expireTime);
+ }
+ }
+}
diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/utils/TestOnLineCarUtils.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/utils/TestOnLineCarUtils.java
index a9e89d1cfd..a730ae9870 100644
--- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/utils/TestOnLineCarUtils.java
+++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/utils/TestOnLineCarUtils.java
@@ -89,6 +89,40 @@ public class TestOnLineCarUtils {
return null;
}
+
+ /**
+ * 模拟道路事件UGC测试数据
+ */
+ public static V2XMessageEntity getV2XScenarioRoadEventUGCData() {
+ try {
+ InputStream inputStream = V2XUtils.getApp()
+ .getResources()
+ .openRawResource(R.raw.scenario_road_event_data);
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ int len = -1;
+ byte[] buffer = new byte[1024];
+ while ((len = inputStream.read(buffer)) != -1) {
+ baos.write(buffer, 0, len);
+ }
+ inputStream.close();
+
+ // 加载数据源
+ V2XRoadEventEntity v2xRoadEventEntity = GsonUtil.objectFromJson(baos.toString(), V2XRoadEventEntity.class);
+
+ V2XMessageEntity v2xMessageEntity = new V2XMessageEntity<>();
+ // 控制类型
+ v2xMessageEntity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_EVENT_UGC_WARNING);
+ // 设置数据
+ v2xMessageEntity.setContent(v2xRoadEventEntity);
+ // 控制展示状态
+ v2xMessageEntity.setShowState(true);
+ return v2xMessageEntity;
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
/**
* 模拟H5推送数据
*/
@@ -224,7 +258,7 @@ public class TestOnLineCarUtils {
}
/**
- * 模拟 疲劳驾驶
+ * 模拟 道路求助
*/
public static V2XMessageEntity> getV2XScenarioSeekHelpData() {
try {
diff --git a/modules/mogo-module-v2x/src/main/res/drawable-xhdpi/v_to_x_event_ugc_fenglu.png b/modules/mogo-module-v2x/src/main/res/drawable-xhdpi/v_to_x_event_ugc_fenglu.png
new file mode 100644
index 0000000000..b3328eba18
Binary files /dev/null and b/modules/mogo-module-v2x/src/main/res/drawable-xhdpi/v_to_x_event_ugc_fenglu.png differ
diff --git a/modules/mogo-module-v2x/src/main/res/drawable-xhdpi/v_to_x_event_ugc_shigong.png b/modules/mogo-module-v2x/src/main/res/drawable-xhdpi/v_to_x_event_ugc_shigong.png
new file mode 100644
index 0000000000..174342e8f8
Binary files /dev/null and b/modules/mogo-module-v2x/src/main/res/drawable-xhdpi/v_to_x_event_ugc_shigong.png differ
diff --git a/modules/mogo-module-v2x/src/main/res/drawable-xhdpi/v_to_x_event_ugc_shigu.png b/modules/mogo-module-v2x/src/main/res/drawable-xhdpi/v_to_x_event_ugc_shigu.png
new file mode 100644
index 0000000000..91f9827041
Binary files /dev/null and b/modules/mogo-module-v2x/src/main/res/drawable-xhdpi/v_to_x_event_ugc_shigu.png differ
diff --git a/modules/mogo-module-v2x/src/main/res/drawable-xhdpi/v_to_x_event_ugc_yongdu.png b/modules/mogo-module-v2x/src/main/res/drawable-xhdpi/v_to_x_event_ugc_yongdu.png
new file mode 100644
index 0000000000..f3c1246f4c
Binary files /dev/null and b/modules/mogo-module-v2x/src/main/res/drawable-xhdpi/v_to_x_event_ugc_yongdu.png differ
diff --git a/modules/mogo-module-v2x/src/main/res/layout/item_v2x_event_ugc.xml b/modules/mogo-module-v2x/src/main/res/layout/item_v2x_event_ugc.xml
new file mode 100644
index 0000000000..e1bf37c9c2
--- /dev/null
+++ b/modules/mogo-module-v2x/src/main/res/layout/item_v2x_event_ugc.xml
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/mogo-module-v2x/src/main/res/layout/window_test_console.xml b/modules/mogo-module-v2x/src/main/res/layout/window_test_console.xml
index ab57767085..1d190c16cc 100644
--- a/modules/mogo-module-v2x/src/main/res/layout/window_test_console.xml
+++ b/modules/mogo-module-v2x/src/main/res/layout/window_test_console.xml
@@ -24,9 +24,11 @@
android:id="@+id/btnTriggerOpen"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_marginEnd="@dimen/dp_10"
+ android:layout_marginBottom="@dimen/dp_10"
+ android:background="#FFF"
android:padding="@dimen/dp_10"
android:text="隐藏测试按钮面板"
- android:background="#FFF"
android:textColor="#000"
android:textSize="@dimen/dp_22"
app:layout_constraintBottom_toBottomOf="parent"
@@ -36,6 +38,8 @@
android:id="@+id/btnClearRoadEvent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_marginEnd="@dimen/dp_10"
+ android:layout_marginBottom="@dimen/dp_10"
android:background="#6BCF23"
android:padding="@dimen/dp_10"
android:text="清除缓存播报"
@@ -48,6 +52,8 @@
android:id="@+id/btnTriggerRoadEvent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_marginEnd="@dimen/dp_10"
+ android:layout_marginBottom="@dimen/dp_10"
android:background="#673AB7"
android:padding="@dimen/dp_10"
android:text="触发道路事件"
@@ -60,6 +66,8 @@
android:id="@+id/btnTriggerPushEvent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_marginEnd="@dimen/dp_10"
+ android:layout_marginBottom="@dimen/dp_10"
android:background="#1EBD85"
android:padding="@dimen/dp_10"
android:text="触发H5推送事件"
@@ -72,6 +80,8 @@
android:id="@+id/btnTriggerPushLiveCarEvent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_marginEnd="@dimen/dp_10"
+ android:layout_marginBottom="@dimen/dp_10"
android:background="#5E096C"
android:padding="@dimen/dp_10"
android:text="触发H5推送直播事件"
@@ -84,6 +94,8 @@
android:id="@+id/btnTriggerAnimationEvent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_marginEnd="@dimen/dp_10"
+ android:layout_marginBottom="@dimen/dp_10"
android:background="#C6BE2C"
android:padding="@dimen/dp_10"
android:text="触发V2X动画"
@@ -95,7 +107,9 @@
+
+