2D弹框预警-进入3D-展示2DUI样式修改:进入3D模式remove掉2D模式下弹框
This commit is contained in:
@@ -59,6 +59,8 @@ dependencies {
|
||||
api rootProject.ext.dependencies.mogoserviceapi
|
||||
implementation rootProject.ext.dependencies.modulecommon
|
||||
implementation rootProject.ext.dependencies.moduleshare
|
||||
implementation rootProject.ext.dependencies.moduleservice
|
||||
|
||||
// implementation rootProject.ext.dependencies.moduleventpanel
|
||||
// implementation rootProject.ext.dependencies.mogomoduleauth
|
||||
} else {
|
||||
@@ -69,6 +71,7 @@ dependencies {
|
||||
api project(':services:mogo-service-api')
|
||||
implementation project(':modules:mogo-module-common')
|
||||
implementation project(':modules:mogo-module-share')
|
||||
implementation project(':modules:mogo-module-service')
|
||||
// implementation project(':modules:mogo-module-event-panel')
|
||||
// implementation project(':modules:mogo-module-authorize')
|
||||
}
|
||||
|
||||
@@ -100,6 +100,7 @@ import java.util.Random;
|
||||
import static com.mogo.module.common.utils.SPConst.getSPGuideRecord;
|
||||
import static com.mogo.module.common.utils.SPConst.getSpGuide;
|
||||
import static com.mogo.module.extensions.ExtensionsModuleConst.TYPE_ENTRANCE;
|
||||
import static com.mogo.module.service.receiver.MogoReceiver.ACTION_V2X_REMOVE_TIP_WINDOW;
|
||||
import static com.mogo.module.share.constant.ShareConstants.KEY_CLICK_SHARE_BUTTON;
|
||||
import static com.mogo.module.share.constant.ShareConstants.KEY_CLICK_SHARE_TIME;
|
||||
import static com.mogo.module.share.constant.ShareConstants.KEY_SERVER_SHOW_DAY_COUNT;
|
||||
@@ -110,6 +111,7 @@ import static com.mogo.module.share.constant.ShareConstants.KEY_SHARE_OUTER_GUID
|
||||
import static com.mogo.module.share.constant.ShareConstants.ONE_DAY_TIME;
|
||||
import static com.mogo.module.share.constant.ShareConstants.SEVEN_DAY_TIME;
|
||||
import static com.mogo.module.share.constant.ShareConstants.VOICE_ALERT_COUNT;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-01-07
|
||||
@@ -285,7 +287,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
mExitNavi = findViewById(R.id.module_entrance_id_exit_navi);
|
||||
mCameraMode = findViewById(R.id.module_ext_id_north);
|
||||
mApis.getIntentManagerApi().registerIntentListener(AUTONAVI_STANDARD_BROADCAST_RECV, this);
|
||||
// mApis.getV2XListenerManager().registerIntentListener(MogoReceiver.ACTION_V2X_REMOVE_TIP_WINDOW, this);
|
||||
MogoEntranceButtons.save(ButtonIndex.BUTTON1, findViewById(R.id.module_entrance_id_button1));
|
||||
MogoEntranceButtons.save(ButtonIndex.BUTTON2, findViewById(R.id.module_entrance_id_button2));
|
||||
mDisplayOverviewBounds = new Rect(
|
||||
@@ -410,20 +411,10 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
MogoApisHandler.getInstance().getApis().getRegisterCenterApi()
|
||||
.registerCarLocationChangedListener(TAG, this);
|
||||
|
||||
// MogoApisHandler.getInstance().getApis().getRegisterCenterApi().registerMogoLocationListener(TAG, this);
|
||||
|
||||
localIsVrMode = true;
|
||||
flSpeed.setVisibility(View.VISIBLE);
|
||||
mSwitchMapModeLayout.setVisibility(View.VISIBLE);
|
||||
|
||||
try {
|
||||
//清除2D模式下道路事件弹框
|
||||
// MarkerServiceHandler.getApis().getV2XListenerManager().changeTipWindowStatusForListener(MogoReceiver.ACTION_V2X_REMOVE_TIP_WINDOW);
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
mApis.getV2XListenerManager().changeTipWindowStatusForListener(ACTION_V2X_REMOVE_TIP_WINDOW);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
package com.mogo.module.v2x.scenario.impl;
|
||||
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.commons.voice.IMogoVoiceCmdCallBack;
|
||||
import com.mogo.commons.voice.VoicePreemptType;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.entity.V2XMessageEntity;
|
||||
import com.mogo.module.service.receiver.MogoReceiver;
|
||||
import com.mogo.module.v2x.V2XConst;
|
||||
import com.mogo.module.v2x.scenario.IV2XScenario;
|
||||
import com.mogo.module.v2x.scenario.view.IV2XButton;
|
||||
@@ -24,7 +27,7 @@ import com.mogo.utils.logger.Logger;
|
||||
* desc :
|
||||
* version: 1.0
|
||||
*/
|
||||
public abstract class AbsV2XScenario<T> implements IV2XScenario, IV2XWindowManagerListener {
|
||||
public abstract class AbsV2XScenario<T> implements IV2XScenario {
|
||||
protected String TAG = "AbsV2XScenario";
|
||||
private IV2XWindow mV2XWindow;
|
||||
private IV2XButton mV2XButton;
|
||||
@@ -56,7 +59,7 @@ public abstract class AbsV2XScenario<T> implements IV2XScenario, IV2XWindowManag
|
||||
@Override
|
||||
public void speakTTSVoice(@Nullable String msg, IMogoVoiceCmdCallBack callBack) {
|
||||
if (!TextUtils.isEmpty(msg)) {
|
||||
Logger.d(V2XConst.MODULE_NAME, "调用TTS播放语音:" + msg);
|
||||
Logger.d(TAG, "调用TTS播放语音:" + msg);
|
||||
AIAssist.getInstance(V2XUtils.getApp()).speakTTSVoice(msg, VoicePreemptType.PREEMPT_TYPE_IMMEADIATELY, callBack);
|
||||
}
|
||||
}
|
||||
@@ -101,8 +104,4 @@ public abstract class AbsV2XScenario<T> implements IV2XScenario, IV2XWindowManag
|
||||
return mV2XMessageEntity.equals(v2XMessageEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeAllTipWindow() {
|
||||
close();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,15 +2,20 @@ package com.mogo.module.v2x.scenario.scene;
|
||||
|
||||
import android.content.Context;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.widget.RelativeLayout;
|
||||
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.service.receiver.MogoReceiver;
|
||||
import com.mogo.module.v2x.V2XServiceManager;
|
||||
import com.mogo.service.v2x.IV2XWindowManagerListener;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
/**
|
||||
* @author donghongyu
|
||||
* @date 12/11/20 10:35 AM
|
||||
*/
|
||||
public class V2XBasWindow extends RelativeLayout {
|
||||
public class V2XBasWindow extends RelativeLayout implements IV2XWindowManagerListener {
|
||||
private final String TAG = "V2XBasWindow";
|
||||
|
||||
public V2XBasWindow(Context context) {
|
||||
@@ -28,6 +33,7 @@ public class V2XBasWindow extends RelativeLayout {
|
||||
@Override
|
||||
protected void onAttachedToWindow() {
|
||||
super.onAttachedToWindow();
|
||||
MogoApisHandler.getInstance().getApis().getV2XListenerManager().registerIntentListener(MogoReceiver.ACTION_V2X_FRONT_WARNING, this);
|
||||
Logger.w(TAG, "onAttachedToWindow……");
|
||||
}
|
||||
|
||||
@@ -44,4 +50,13 @@ public class V2XBasWindow extends RelativeLayout {
|
||||
protected void release() {
|
||||
Logger.w(TAG, "release……");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeTipWindowByListener() {
|
||||
Log.d(TAG, "removeAllTipWindow");
|
||||
V2XServiceManager
|
||||
.getMogoTopViewManager()
|
||||
.removeView(this);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,5 +7,5 @@ package com.mogo.service.v2x;
|
||||
*/
|
||||
public interface IV2XWindowManagerListener {
|
||||
//移除v2x的所有道路事件及预警弹框
|
||||
void removeAllTipWindow();
|
||||
void removeTipWindowByListener();
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ public class V2XManager implements IV2XProvider {
|
||||
if (listeners != null && !listeners.isEmpty()) {
|
||||
for (IV2XWindowManagerListener listener : listeners) {
|
||||
if (listener != null) {
|
||||
listener.removeAllTipWindow();
|
||||
listener.removeTipWindowByListener();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user