增加了事件播报的清除功能
This commit is contained in:
@@ -4,7 +4,6 @@ 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;
|
||||
@@ -17,8 +16,10 @@ import com.mogo.module.common.entity.V2XPushMessageEntity;
|
||||
import com.mogo.module.common.entity.V2XRoadEventEntity;
|
||||
import com.mogo.module.v2x.R;
|
||||
import com.mogo.module.v2x.V2XConst;
|
||||
import com.mogo.module.v2x.alarm.V2XAlarmServer;
|
||||
import com.mogo.module.v2x.entity.net.V2XSpecialCarRes;
|
||||
import com.mogo.module.v2x.utils.TestOnLineCarUtils;
|
||||
import com.mogo.module.v2x.utils.ToastUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -33,6 +34,7 @@ public class V2XTestConsoleWindow extends ConstraintLayout {
|
||||
private FlexboxLayout mFlTestPanel;
|
||||
private Button mBtnTriggerOpen;
|
||||
private Button mBtnTriggerRoadEvent;
|
||||
private Button mBtnClearRoadEvent;
|
||||
private Button mBtnTriggerPushEvent;
|
||||
private Button mBtnTriggerPushLiveCarEvent;
|
||||
private Button mBtnTriggerAnimationEvent;
|
||||
@@ -58,6 +60,7 @@ public class V2XTestConsoleWindow extends ConstraintLayout {
|
||||
|
||||
mFlTestPanel = findViewById(R.id.flTestPanel);
|
||||
mBtnTriggerOpen = findViewById(R.id.btnTriggerOpen);
|
||||
mBtnClearRoadEvent = findViewById(R.id.btnClearRoadEvent);
|
||||
mBtnTriggerRoadEvent = findViewById(R.id.btnTriggerRoadEvent);
|
||||
mBtnTriggerPushEvent = findViewById(R.id.btnTriggerPushEvent);
|
||||
mBtnTriggerPushLiveCarEvent = findViewById(R.id.btnTriggerPushLiveCarEvent);
|
||||
@@ -68,6 +71,11 @@ public class V2XTestConsoleWindow extends ConstraintLayout {
|
||||
|
||||
mBtnTriggerOpen.setOnClickListener(v -> mFlTestPanel.setVisibility(GONE));
|
||||
|
||||
mBtnClearRoadEvent.setOnClickListener(v -> {
|
||||
V2XAlarmServer.mAlertRoadEventList.clear();
|
||||
ToastUtils.showShort("缓存已清除");
|
||||
});
|
||||
|
||||
mBtnTriggerRoadEvent.setOnClickListener(v -> {
|
||||
V2XMessageEntity<V2XRoadEventEntity> v2XMessageEntity =
|
||||
TestOnLineCarUtils.getV2XScenarioRoadEventData();
|
||||
|
||||
Reference in New Issue
Block a user