2D弹框预警-进入3D-展示2DUI样式修改:进入3D模式remove掉2D模式下弹框
This commit is contained in:
@@ -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);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user