diff --git a/libraries/map-custom/build.gradle b/libraries/map-custom/build.gradle
index 059edd3cad..2a4d16460d 100644
--- a/libraries/map-custom/build.gradle
+++ b/libraries/map-custom/build.gradle
@@ -55,7 +55,7 @@ dependencies {
implementation project(':foudations:mogo-commons')
}
- implementation 'com.zhidaoauto.machine:map:1.0.0-online-28'
+ implementation 'com.zhidaoauto.machine:map:1.0.0-online-27'
}
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/V2XConst.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/V2XConst.java
index 3dd0dc1cf6..146c3280ce 100644
--- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/V2XConst.java
+++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/V2XConst.java
@@ -37,6 +37,7 @@ public class V2XConst {
*/
public static final String BROADCAST_TEST_PANEL_CONTROL_ACTION = "com.v2x.com.v2x.test_panel_control";
public static final String BROADCAST_TEST_PANEL_CONTROL_EXTRA_KEY = "TextPanelOpenStatus";
+ public static final String BROADCAST_TEST_PANEL_CONTROL_TYPE_EXTRA_KEY = "TextPanelOpenType";
public static final String BROADCAST_SCENE_ACTION = "com.v2x.scene_local_broadcast";
diff --git a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/receiver/TestPanelBroadcastReceiver.java b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/receiver/TestPanelBroadcastReceiver.java
index 7123176fba..bb19973358 100644
--- a/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/receiver/TestPanelBroadcastReceiver.java
+++ b/modules/mogo-module-v2x/src/main/java/com/mogo/module/v2x/receiver/TestPanelBroadcastReceiver.java
@@ -21,15 +21,17 @@ public class TestPanelBroadcastReceiver extends BroadcastReceiver {
public void onReceive(Context context, Intent intent) {
try {
boolean textPanelOpenStatus = intent.getBooleanExtra(V2XConst.BROADCAST_TEST_PANEL_CONTROL_EXTRA_KEY, false);
+ int textPanelOpenType = intent.getIntExtra(V2XConst.BROADCAST_TEST_PANEL_CONTROL_TYPE_EXTRA_KEY, 0);
Logger.d(TAG, "textPanelOpenStatus:" + textPanelOpenStatus);
+ Logger.d(TAG, "textPanelOpenType:" + textPanelOpenType);
if (textPanelOpenStatus) {
V2XServiceManager
.getIMogoWindowManager()
- .addView(V2XTestConsoleWindow.getInstance(context), 0, 0, false);
+ .addView(V2XTestConsoleWindow.getInstance(context, textPanelOpenType), 0, 0, false);
} else {
V2XServiceManager
.getIMogoWindowManager()
- .removeView(V2XTestConsoleWindow.getInstance(context));
+ .removeView(V2XTestConsoleWindow.getInstance(context, textPanelOpenType));
}
} catch (Exception e) {
e.printStackTrace();
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 bc5fa627bd..355fb04449 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
@@ -6,6 +6,7 @@ import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
+import android.widget.LinearLayout;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
@@ -39,7 +40,10 @@ import static android.text.style.TtsSpan.GENDER_MALE;
public class V2XTestConsoleWindow extends ConstraintLayout {
private static V2XTestConsoleWindow mV2XTestConsoleWindow;
- private FlexboxLayout mFlTestPanel;
+ private LinearLayout mFlTestPanel;
+ private FlexboxLayout flTestPanelShunNormal;
+ private FlexboxLayout flTestPanelShunYi;
+ private FlexboxLayout flTestPanelVR;
private Button mBtnTriggerOpen;
private Button mBtnTriggerRoadEvent;
private Button mBtnClearRoadEvent;
@@ -61,17 +65,22 @@ public class V2XTestConsoleWindow extends ConstraintLayout {
btnTriggerCongestedRouteRecommendation,
btnTriggerDoubleFlash;
- public static V2XTestConsoleWindow getInstance(Context context) {
+ public static V2XTestConsoleWindow getInstance(Context context, int showType) {
if (mV2XTestConsoleWindow == null) {
synchronized (V2XTestConsoleWindow.class) {
if (mV2XTestConsoleWindow == null) {
- mV2XTestConsoleWindow = new V2XTestConsoleWindow(context);
+ mV2XTestConsoleWindow = new V2XTestConsoleWindow(context, showType);
}
}
}
return mV2XTestConsoleWindow;
}
+ public V2XTestConsoleWindow(Context context, int showType) {
+ super(context);
+ initView(context, showType);
+ }
+
public V2XTestConsoleWindow(Context context) {
this(context, null);
}
@@ -82,13 +91,16 @@ public class V2XTestConsoleWindow extends ConstraintLayout {
public V2XTestConsoleWindow(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
- initView(context);
+ initView(context, 0);
}
- private void initView(Context context) {
+ private void initView(Context context, int showType) {
LayoutInflater.from(context).inflate(R.layout.window_test_console, this);
mFlTestPanel = findViewById(R.id.flTestPanel);
+ flTestPanelShunNormal = findViewById(R.id.flTestPanelShunNormal);
+ flTestPanelShunYi = findViewById(R.id.flTestPanelShunYi);
+ flTestPanelVR = findViewById(R.id.flTestPanelVR);
mBtnTriggerOpen = findViewById(R.id.btnTriggerOpen);
mBtnClearRoadEvent = findViewById(R.id.btnClearRoadEvent);
mBtnTriggerRoadEvent = findViewById(R.id.btnTriggerRoadEvent);
@@ -111,6 +123,24 @@ public class V2XTestConsoleWindow extends ConstraintLayout {
btnTriggerDoubleFlash = findViewById(R.id.btnTriggerDoubleFlash);
+ switch (showType) {
+ case 0:
+ flTestPanelShunNormal.setVisibility(View.VISIBLE);
+ flTestPanelShunYi.setVisibility(View.VISIBLE);
+ flTestPanelVR.setVisibility(View.VISIBLE);
+ break;
+ case 1:
+ flTestPanelShunNormal.setVisibility(View.VISIBLE);
+ break;
+ case 2:
+ flTestPanelShunYi.setVisibility(View.VISIBLE);
+ break;
+ case 3:
+ flTestPanelVR.setVisibility(View.VISIBLE);
+ break;
+ }
+
+
mBtnTriggerCallUserInfo.setOnClickListener(v -> {
MogoDriverInfo mogoDriverInfo = new MogoDriverInfo();
mogoDriverInfo.setAge(24);
@@ -124,7 +154,7 @@ public class V2XTestConsoleWindow extends ConstraintLayout {
mBtnTriggerOpen.setOnClickListener(v ->
V2XServiceManager
.getIMogoWindowManager()
- .removeView(V2XTestConsoleWindow.getInstance(context))
+ .removeView(V2XTestConsoleWindow.getInstance(context, showType))
);
mBtnClearRoadEvent.setOnClickListener(v -> {
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 7b52dcf96f..bfcf5addec 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
@@ -6,336 +6,390 @@
android:orientation="horizontal"
android:paddingStart="@dimen/module_main_v2x_animation_width">
-
+ android:paddingEnd="@dimen/dp_100">
-
-
-
-
-
+ app:alignContent="flex_start"
+ app:alignItems="center"
+ app:flexDirection="row"
+ app:flexWrap="wrap"
+ app:justifyContent="flex_start">
-
+
+
-
+
-
-
-
-
-
-
-
-
-
+ android:visibility="gone"
+ app:alignContent="flex_start"
+ app:alignItems="center"
+ app:flexDirection="row"
+ app:flexWrap="wrap"
+ app:justifyContent="flex_start">
-
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+ android:visibility="gone"
+ app:alignContent="flex_start"
+ app:alignItems="center"
+ app:flexDirection="row"
+ app:flexWrap="wrap"
+ app:justifyContent="flex_start">
-
+
+
+
+
+
+
+
+
+
+
+ android:layout_alignParentBottom="true"
+ android:orientation="horizontal"
+ android:visibility="gone"
+ app:alignContent="flex_start"
+ app:alignItems="center"
+ app:flexDirection="row"
+ app:flexWrap="wrap"
+ app:justifyContent="flex_start">
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
+
+
+
+
+
+
\ No newline at end of file