From 33b43af95dca64ec8d50fdfa4dd248fe0c50c66e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=AE=87?= Date: Mon, 27 Jul 2020 15:34:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BA=86=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E6=94=B6=E8=B5=B7=E5=8A=9F=E8=83=BD=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scene/test/V2XTestConsoleWindow.java | 8 +++++++- .../src/main/res/layout/window_test_console.xml | 16 +++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) 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 db742c9792..b5230b64e0 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 @@ -10,6 +10,7 @@ import android.widget.Button; import androidx.constraintlayout.widget.ConstraintLayout; import androidx.localbroadcastmanager.content.LocalBroadcastManager; +import com.google.android.flexbox.FlexboxLayout; import com.mogo.module.common.entity.MarkerExploreWay; import com.mogo.module.common.entity.V2XMessageEntity; import com.mogo.module.common.entity.V2XPushMessageEntity; @@ -29,7 +30,8 @@ import java.util.List; * version: 1.0 */ public class V2XTestConsoleWindow extends ConstraintLayout { - + private FlexboxLayout mFlTestPanel; + private Button mBtnTriggerOpen; private Button mBtnTriggerRoadEvent; private Button mBtnTriggerPushEvent; private Button mBtnTriggerPushLiveCarEvent; @@ -54,6 +56,8 @@ public class V2XTestConsoleWindow extends ConstraintLayout { private void initView(Context context) { LayoutInflater.from(context).inflate(R.layout.window_test_console, this); + mFlTestPanel = findViewById(R.id.flTestPanel); + mBtnTriggerOpen = findViewById(R.id.btnTriggerOpen); mBtnTriggerRoadEvent = findViewById(R.id.btnTriggerRoadEvent); mBtnTriggerPushEvent = findViewById(R.id.btnTriggerPushEvent); mBtnTriggerPushLiveCarEvent = findViewById(R.id.btnTriggerPushLiveCarEvent); @@ -62,6 +66,8 @@ public class V2XTestConsoleWindow extends ConstraintLayout { mBtnTriggerSeekHelpEvent = findViewById(R.id.btnTriggerSeekHelpEvent); mBtnTriggerParkEvent = findViewById(R.id.btnTriggerParkEvent); + mBtnTriggerOpen.setOnClickListener(v -> mFlTestPanel.setVisibility(GONE)); + mBtnTriggerRoadEvent.setOnClickListener(v -> { V2XMessageEntity v2XMessageEntity = TestOnLineCarUtils.getV2XScenarioRoadEventData(); 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 9f0cc0016a..addfbc7eb1 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 @@ -7,17 +7,31 @@ android:paddingStart="@dimen/module_main_v2x_animation_width"> +