合并测试面板
This commit is contained in:
@@ -43,7 +43,6 @@ public class V2XTestConsoleWindow extends ConstraintLayout {
|
||||
private LinearLayout mFlTestPanel;
|
||||
private FlexboxLayout flTestPanelShunNormal;
|
||||
private FlexboxLayout flTestPanelShunYi;
|
||||
private FlexboxLayout flTestPanelVR;
|
||||
private Button mBtnTriggerOpen;
|
||||
private Button mBtnTriggerRoadEvent;
|
||||
private Button mBtnClearRoadEvent;
|
||||
@@ -56,16 +55,6 @@ public class V2XTestConsoleWindow extends ConstraintLayout {
|
||||
private Button mBtnTriggerCallUserInfo;
|
||||
private Button mBtnTriggerEventUgc;
|
||||
|
||||
private Button btnTriggerRearVIPCarTip,
|
||||
btnTriggerVehicleBrakes,
|
||||
btnTriggerRearDangerousVehicles,
|
||||
btnTriggerReverseVehicleRoutePrediction,
|
||||
btnTriggerVIPLightChange,
|
||||
btnTriggerObstacleDetour,
|
||||
btnTriggerPedestrianWarning,
|
||||
btnTriggerCongestedRouteRecommendation,
|
||||
btnTriggerDoubleFlash;
|
||||
|
||||
public static V2XTestConsoleWindow getInstance(Context context, int showType) {
|
||||
if (mV2XTestConsoleWindow == null) {
|
||||
synchronized (V2XTestConsoleWindow.class) {
|
||||
@@ -101,7 +90,6 @@ public class V2XTestConsoleWindow extends ConstraintLayout {
|
||||
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);
|
||||
@@ -114,22 +102,10 @@ public class V2XTestConsoleWindow extends ConstraintLayout {
|
||||
mBtnTriggerEventUgc = findViewById(R.id.btnTriggerEventUgc);
|
||||
mBtnTriggerCallUserInfo = findViewById(R.id.btnTriggerCallUserInfo);
|
||||
|
||||
btnTriggerRearVIPCarTip = findViewById(R.id.btnTriggerRearVIPCarTip);
|
||||
btnTriggerVehicleBrakes = findViewById(R.id.btnTriggerVehicleBrakes);
|
||||
btnTriggerRearDangerousVehicles = findViewById(R.id.btnTriggerRearDangerousVehicles);
|
||||
btnTriggerReverseVehicleRoutePrediction = findViewById(R.id.btnTriggerReverseVehicleRoutePrediction);
|
||||
btnTriggerVIPLightChange = findViewById(R.id.btnTriggerVIPLightChange);
|
||||
btnTriggerObstacleDetour = findViewById(R.id.btnTriggerObstacleDetour);
|
||||
btnTriggerPedestrianWarning = findViewById(R.id.btnTriggerPedestrianWarning);
|
||||
btnTriggerCongestedRouteRecommendation = findViewById(R.id.btnTriggerCongestedRouteRecommendation);
|
||||
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);
|
||||
@@ -137,9 +113,6 @@ public class V2XTestConsoleWindow extends ConstraintLayout {
|
||||
case 2:
|
||||
flTestPanelShunYi.setVisibility(View.VISIBLE);
|
||||
break;
|
||||
case 3:
|
||||
flTestPanelVR.setVisibility(View.VISIBLE);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -241,76 +214,6 @@ public class V2XTestConsoleWindow extends ConstraintLayout {
|
||||
LocalBroadcastManager.getInstance(getContext()).sendBroadcast(intent);
|
||||
});
|
||||
|
||||
/*
|
||||
*后方VIP车辆提示
|
||||
* */
|
||||
btnTriggerRearVIPCarTip.setOnClickListener(v -> {
|
||||
|
||||
});
|
||||
/*
|
||||
*前车急刹
|
||||
* */
|
||||
btnTriggerVehicleBrakes.setOnClickListener(v -> {
|
||||
|
||||
});
|
||||
/*
|
||||
*后方危险车辆预警
|
||||
* */
|
||||
btnTriggerRearDangerousVehicles.setOnClickListener(v -> {
|
||||
|
||||
});
|
||||
|
||||
/*
|
||||
* 逆向车辆路线预判
|
||||
* */
|
||||
btnTriggerReverseVehicleRoutePrediction.setOnClickListener(v -> {
|
||||
V2XMessageEntity<V2XPushMessageEntity> v2XMessageEntity =
|
||||
TestOnLineCarUtils.getV2XScenarionVRReverseCarData();
|
||||
|
||||
Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION);
|
||||
intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity);
|
||||
LocalBroadcastManager.getInstance(getContext()).sendBroadcast(intent);
|
||||
});
|
||||
|
||||
/*
|
||||
*VIP变灯通行
|
||||
* */
|
||||
btnTriggerVIPLightChange.setOnClickListener(v -> {
|
||||
|
||||
});
|
||||
|
||||
/*
|
||||
*障碍物绕行
|
||||
* */
|
||||
btnTriggerObstacleDetour.setOnClickListener(v -> {
|
||||
|
||||
});
|
||||
|
||||
/*
|
||||
*行人预警,行人路线预测
|
||||
* */
|
||||
btnTriggerPedestrianWarning.setOnClickListener(v -> {
|
||||
|
||||
});
|
||||
|
||||
/*
|
||||
*拥堵路线推荐
|
||||
* */
|
||||
btnTriggerCongestedRouteRecommendation.setOnClickListener(v -> {
|
||||
V2XMessageEntity<V2XPushMessageEntity> v2XMessageEntity =
|
||||
TestOnLineCarUtils.getV2XScenarioPushVR();
|
||||
|
||||
Intent intent = new Intent(V2XConst.BROADCAST_SCENE_HANDLER_ACTION);
|
||||
intent.putExtra(V2XConst.BROADCAST_SCENE_EXTRA_KEY, v2XMessageEntity);
|
||||
LocalBroadcastManager.getInstance(getContext()).sendBroadcast(intent);
|
||||
});
|
||||
|
||||
/*
|
||||
*双闪车辆,自动绕行
|
||||
* */
|
||||
btnTriggerDoubleFlash.setOnClickListener(v -> {
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -152,20 +152,6 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnTriggerEventUgc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:background="#58FF5F"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:text="触发事件UGC"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/dp_22"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnTriggerCallUserInfo"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -251,159 +237,5 @@
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
</com.google.android.flexbox.FlexboxLayout>
|
||||
|
||||
|
||||
<com.google.android.flexbox.FlexboxLayout
|
||||
android:id="@+id/flTestPanelVR"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
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">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:background="#000000"
|
||||
android:orientation="horizontal"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:text="VR鹰眼计划推送模拟"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/dp_22"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnTriggerRearVIPCarTip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:background="#B85B53"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:text="后方VIP车辆提示"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/dp_22"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnTriggerVehicleBrakes"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:background="#E91E63"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:text="前车急刹"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/dp_22"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnTriggerRearDangerousVehicles"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:background="#9C27B0"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:text="后方危险车辆预警"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/dp_22"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnTriggerReverseVehicleRoutePrediction"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:background="#3F51B5"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:text="逆向车辆路线预判"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/dp_22"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnTriggerVIPLightChange"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:background="#2196F3"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:text="VIP变灯"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/dp_22"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnTriggerObstacleDetour"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:background="#00BCD4"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:text="障碍物绕行"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/dp_22"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnTriggerPedestrianWarning"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:background="#009688"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:text="行人预警,行人路线预测"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/dp_22"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnTriggerCongestedRouteRecommendation"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:background="#4CAF50"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:text="拥堵路线推荐"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/dp_22"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnTriggerDoubleFlash"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/dp_10"
|
||||
android:layout_marginBottom="@dimen/dp_10"
|
||||
android:background="#8BC34A"
|
||||
android:padding="@dimen/dp_10"
|
||||
android:text="双闪车辆,自动绕行"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/dp_22"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</com.google.android.flexbox.FlexboxLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
Reference in New Issue
Block a user