[Remove]
移除废弃的功能集合 Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
@@ -104,8 +104,6 @@ internal object BridgeApi {
|
||||
|
||||
fun registerCenter() = apis?.registerCenterApi
|
||||
|
||||
fun entranceButton() = apis?.entranceButtonController
|
||||
|
||||
fun imageLoader() = apis?.imageLoaderApi
|
||||
|
||||
fun windowManager() = apis?.windowManagerApi
|
||||
|
||||
@@ -241,30 +241,9 @@ class V2XEventPanelFragment : MvpFragment<V2XEventPanelFragment, EventPanelPrese
|
||||
}
|
||||
}
|
||||
|
||||
// M1 不基于地图的版本直接展示事件面板,且不可关闭
|
||||
if (DebugConfig.isMapBased()) {
|
||||
val x = resources.getDimensionPixelSize(if (DebugConfig.isLauncher()) {
|
||||
R.dimen.module_v2x_event_panel_in_launcher_btn_x
|
||||
} else {
|
||||
R.dimen.module_v2x_event_panel_btn_x
|
||||
})
|
||||
val y = resources.getDimensionPixelSize(R.dimen.module_v2x_event_panel_btn_y)
|
||||
|
||||
BridgeApi.entranceButton()?.let {
|
||||
it.addBottomLayerView(mV2XEventPanelHistoryCountView, x, y)
|
||||
}
|
||||
mV2XEventPanelHistoryCountView?.visibility = if (MogoApisHandler.getInstance().apis.statusManagerApi.isVrMode) {
|
||||
View.GONE
|
||||
}else{
|
||||
View.VISIBLE
|
||||
}
|
||||
changeEventCount()
|
||||
MogoApisHandler.getInstance().apis.statusManagerApi.registerStatusChangedListener(MODULE_NAME, StatusDescriptor.VR_MODE, this)
|
||||
} else {
|
||||
// 模拟手动点击,默认选择第二个,周边事件
|
||||
// http://jira.zhidaohulian.com/browse/E84XAD-250
|
||||
mRgTabSelect?.check(R.id.rbSurroundingEvent)
|
||||
}
|
||||
// 模拟手动点击,默认选择第二个,周边事件
|
||||
// http://jira.zhidaohulian.com/browse/E84XAD-250
|
||||
mRgTabSelect?.check(R.id.rbSurroundingEvent)
|
||||
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
|
||||
@@ -3,8 +3,6 @@ package com.mogo.eagle.core.function.v2x.events.scenario.scene.help;
|
||||
import static com.mogo.eagle.core.function.v2x.events.consts.V2XConst.MODULE_NAME;
|
||||
|
||||
import android.os.CountDownTimer;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
@@ -16,17 +14,15 @@ import com.mogo.eagle.core.function.v2x.events.manager.IMoGoV2XStatusManager;
|
||||
import com.mogo.eagle.core.function.v2x.events.scenario.impl.AbsV2XScenario;
|
||||
import com.mogo.eagle.core.function.v2x.events.voice.V2XVoiceCallbackListener;
|
||||
import com.mogo.eagle.core.function.v2x.events.voice.V2XVoiceConstants;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.Utils;
|
||||
import com.mogo.module.common.entity.V2XMessageEntity;
|
||||
import com.mogo.module.v2x.voice.V2XVoiceManager;
|
||||
import com.mogo.service.entrance.ButtonIndex;
|
||||
import com.mogo.service.entrance.IMogoEntranceButtonController;
|
||||
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
import com.mogo.service.statusmanager.StatusDescriptor;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
|
||||
/**
|
||||
* @ProjectName: MoGoModulSafeDriving
|
||||
@@ -69,15 +65,6 @@ public class V2XCarForHelpScenario extends AbsV2XScenario<Boolean> implements IM
|
||||
showButton();
|
||||
mySeekHelpCountDownTimerCancel();
|
||||
mySeekHelpCountDownTimerStart();
|
||||
if (cancelCb == null) {
|
||||
cancelCb = (command, intent) -> {
|
||||
IMogoEntranceButtonController entranceButton = BridgeApi.INSTANCE.entranceButton();
|
||||
TextView tv = entranceButton != null ? entranceButton.getButton(ButtonIndex.BUTTON2) : null;
|
||||
if (tv != null) {
|
||||
showDialog();
|
||||
}
|
||||
};
|
||||
}
|
||||
unregisterSeekHelpButtonCmd();
|
||||
V2XVoiceManager.INSTANCE.registerWakeCmd(V2XVoiceConstants.COMMAND_ZHIDAO_V2X_CANCEL_HELP, cancelCb);
|
||||
V2XVoiceManager.INSTANCE.registerUnWakeVoice(V2XVoiceConstants.COMMAND_V2X_TO_CANCEL_FOR_HELP_UN_WAKEUP, cancelCb);
|
||||
@@ -109,7 +96,7 @@ public class V2XCarForHelpScenario extends AbsV2XScenario<Boolean> implements IM
|
||||
if (getV2XButton() != null) {
|
||||
getV2XButton().setOnActionListener(this::showDialog);
|
||||
getV2XButton().show();
|
||||
// V2XServiceManager.getMogoEntranceButtonController().showLeftNoticeByType(IMogoEntranceButtonController.NOTICE_TYPE_SEEK_HELP, R.drawable.module_v2x_left_notice_seek_help, "正在发起求助...");
|
||||
// V2XServiceManager.getMogoEntranceButtonController().showLeftNoticeByType(IMogoEntranceButtonController.NOTICE_TYPE_SEEK_HELP, R.drawable.module_v2x_left_notice_seek_help, "正在发起求助...");
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -123,10 +110,6 @@ public class V2XCarForHelpScenario extends AbsV2XScenario<Boolean> implements IM
|
||||
}
|
||||
if (isSeekHelping) {
|
||||
Logger.d(TAG, "关闭自车求助按钮!");
|
||||
IMogoEntranceButtonController entranceButton = BridgeApi.INSTANCE.entranceButton();
|
||||
if (entranceButton != null) {
|
||||
entranceButton.hideLeftNoticeByType(IMogoEntranceButtonController.NOTICE_TYPE_SEEK_HELP);
|
||||
}
|
||||
statusManager.setSeekHelping(TAG, false);
|
||||
if (getV2XButton() != null) {
|
||||
getV2XButton().close();
|
||||
@@ -246,33 +229,6 @@ public class V2XCarForHelpScenario extends AbsV2XScenario<Boolean> implements IM
|
||||
entity.setType(V2XMessageEntity.V2XTypeEnum.ALERT_CAR_FOR_HELP);
|
||||
entity.setContent(isTrue);
|
||||
init(entity);
|
||||
} else if (descriptor == StatusDescriptor.VR_MODE) {
|
||||
boolean isSeekHelping = false;
|
||||
IMogoStatusManager statusManager = BridgeApi.INSTANCE.statusManager();
|
||||
if (statusManager != null) {
|
||||
isSeekHelping = statusManager.isSeekHelping();
|
||||
}
|
||||
if (isSeekHelping) {
|
||||
if (isTrue) {
|
||||
((V2XSeekHelpButton) getV2XButton()).showTopView();
|
||||
IMogoEntranceButtonController entranceButton = BridgeApi.INSTANCE.entranceButton();
|
||||
if (entranceButton != null) {
|
||||
TextView button = entranceButton.getButton(ButtonIndex.BUTTON2);
|
||||
if (button != null) {
|
||||
button.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
((V2XSeekHelpButton) getV2XButton()).closeTopView();
|
||||
IMogoEntranceButtonController entranceButton = BridgeApi.INSTANCE.entranceButton();
|
||||
if (entranceButton != null) {
|
||||
TextView button = entranceButton.getButton(ButtonIndex.BUTTON2);
|
||||
if (button != null) {
|
||||
button.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
import com.mogo.eagle.core.function.v2x.R;
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
|
||||
import com.mogo.eagle.core.function.v2x.events.network.V2XRefreshCallback;
|
||||
@@ -17,9 +17,6 @@ import com.mogo.eagle.core.function.v2x.events.voice.V2XVoiceCallbackListener;
|
||||
import com.mogo.eagle.core.function.v2x.events.voice.V2XVoiceConstants;
|
||||
import com.mogo.eagle.core.utilcode.util.Utils;
|
||||
import com.mogo.module.v2x.voice.V2XVoiceManager;
|
||||
import com.mogo.service.entrance.ButtonIndex;
|
||||
import com.mogo.service.entrance.IMogoEntranceButtonController;
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
import com.mogo.service.windowview.IMogoTopViewManager;
|
||||
|
||||
/**
|
||||
@@ -57,34 +54,6 @@ public class V2XSeekHelpButton implements IV2XButton {
|
||||
@Override
|
||||
public void show() {
|
||||
registerVoice();
|
||||
try {
|
||||
IMogoEntranceButtonController entranceButton = BridgeApi.INSTANCE.entranceButton();
|
||||
|
||||
tv = entranceButton != null ? entranceButton.getButton(ButtonIndex.BUTTON2) : null;
|
||||
if (tv != null) {
|
||||
tv.setText("取消\n求助");
|
||||
tv.setOnClickListener(v -> {
|
||||
//调用取消求助接口
|
||||
// TODO: 2020/5/18 回调,显示对话框
|
||||
doAction();
|
||||
});
|
||||
}
|
||||
boolean isVrMode = false;
|
||||
IMogoStatusManager statusManager = BridgeApi.INSTANCE.statusManager();
|
||||
if (statusManager != null) {
|
||||
isVrMode = statusManager.isVrMode();
|
||||
}
|
||||
if (isVrMode) {
|
||||
showTopView();
|
||||
tv.setVisibility(View.GONE);
|
||||
} else {
|
||||
closeTopView();
|
||||
tv.setVisibility(View.VISIBLE);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public void showTopView() {
|
||||
|
||||
@@ -4,15 +4,11 @@ import android.content.Intent;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.mogo.eagle.core.function.v2x.R;
|
||||
import com.mogo.eagle.core.function.v2x.events.bridge.BridgeApi;
|
||||
import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XButton;
|
||||
import com.mogo.eagle.core.function.v2x.events.scenario.view.IV2XButtonListener;
|
||||
import com.mogo.eagle.core.function.v2x.events.voice.V2XVoiceCallbackListener;
|
||||
import com.mogo.eagle.core.function.v2x.events.voice.V2XVoiceConstants;
|
||||
import com.mogo.module.v2x.voice.V2XVoiceManager;
|
||||
import com.mogo.service.entrance.ButtonIndex;
|
||||
import com.mogo.service.entrance.IMogoEntranceButtonController;
|
||||
|
||||
/**
|
||||
* 道路实况按钮
|
||||
@@ -36,19 +32,6 @@ public class V2XRoadEventButton implements IV2XButton {
|
||||
public void show() {
|
||||
// 注册语音交互
|
||||
registerVoice();
|
||||
IMogoEntranceButtonController entranceButton = BridgeApi.INSTANCE.entranceButton();
|
||||
tv = entranceButton != null ? entranceButton.getButton(ButtonIndex.BUTTON1) : null;
|
||||
if (tv != null){
|
||||
tv.setText("查看\n详情");
|
||||
tv.setBackgroundResource(R.drawable.bg_v2x_event_live_show);
|
||||
tv.setVisibility(View.VISIBLE);
|
||||
tv.setOnClickListener(v -> {
|
||||
if (mListener != null) {
|
||||
mListener.onAction();
|
||||
}
|
||||
close();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -159,13 +159,6 @@ public class MogoServicePaths {
|
||||
@Deprecated
|
||||
public static final String PATH_REFRESH_STRATEGY_API = "/refreshstrategy/api";
|
||||
|
||||
/**
|
||||
* 入口按钮
|
||||
*/
|
||||
@Keep
|
||||
@Deprecated
|
||||
public static final String PATH_ENTRANCE_BUTTON_API = "/entrancebutton/api";
|
||||
|
||||
/**
|
||||
* 顶部1/2屏管理
|
||||
*/
|
||||
|
||||
@@ -536,7 +536,6 @@ class CallingWindowManager private constructor() : IVoiceIntentListener {
|
||||
|
||||
fun resetStatus() {
|
||||
isLauncherCallingViewShown = false
|
||||
serviceApi?.entranceButtonController?.removeLeftFeatureView(launcherCallingView)
|
||||
launcherCallingView = null
|
||||
}
|
||||
|
||||
|
||||
@@ -50,21 +50,18 @@ import com.mogo.map.uicontroller.EnumMapUI;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
import com.mogo.map.uicontroller.VisualAngleMode;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.common.dialog.WMDialog;
|
||||
import com.mogo.module.common.map.CustomNaviInterrupter;
|
||||
import com.mogo.module.common.map.MapCenterPointStrategy;
|
||||
import com.mogo.module.common.map.Scene;
|
||||
import com.mogo.module.common.view.OnPreventFastClickListener;
|
||||
import com.mogo.module.extensions.R;
|
||||
import com.mogo.module.extensions.utils.CameraLiveNoticeHelper;
|
||||
import com.mogo.module.extensions.utils.EntranceViewHolder;
|
||||
import com.mogo.module.extensions.utils.NoMapTopViewShaderHelper;
|
||||
import com.mogo.module.extensions.utils.TopViewAnimHelper;
|
||||
import com.mogo.module.extensions.utils.TopViewNoLinkageAnimHelper;
|
||||
import com.mogo.service.IMogoServiceApis;
|
||||
import com.mogo.service.analytics.IMogoAnalytics;
|
||||
import com.mogo.service.cloud.socket.IMogoOnMessageListener;
|
||||
import com.mogo.service.entrance.ButtonIndex;
|
||||
import com.mogo.service.fragmentmanager.IFragmentProvider;
|
||||
import com.mogo.service.fragmentmanager.IMogoFragmentManager;
|
||||
import com.mogo.service.intent.IMogoIntentListener;
|
||||
@@ -93,14 +90,8 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
|
||||
private static final String TAG = "EntranceFragment";
|
||||
|
||||
private View mUploadRoadCondition;
|
||||
private TextView mUpload;
|
||||
private ImageView mUploading;
|
||||
|
||||
private ImageButton mMove2CurrentLocation;
|
||||
|
||||
private TextView mExitNavi;
|
||||
|
||||
private View mDisplayOverview;
|
||||
private TextView mDisplayOverviewText;
|
||||
|
||||
@@ -139,7 +130,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
|
||||
private Rect mDisplayOverviewBounds;
|
||||
|
||||
private TextView tvEnterVrMode;
|
||||
private TextView tvExitVrMode;
|
||||
|
||||
|
||||
@@ -187,7 +177,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
|
||||
mEntrancePresenter = new EntrancePresenter(getContext(), this);
|
||||
mMogoFragmentManager = mApis.getFragmentManagerApi();
|
||||
EntranceViewHolder.getInstance().initRootViewGroup(mRootView);
|
||||
|
||||
mStatusManager = mApis.getStatusManagerApi();
|
||||
|
||||
@@ -196,10 +185,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
|
||||
NoMapTopViewShaderHelper.getInstance().initShaderView(findViewById(R.id.module_ext_id_top_container_shader));
|
||||
|
||||
mUploadRoadCondition = findViewById(R.id.module_entrance_id_upload_road_condition);
|
||||
mUpload = findViewById(R.id.module_entrance_id_upload);
|
||||
mUploading = findViewById(R.id.module_entrance_id_uploading);
|
||||
mUploadRoadCondition.setOnClickListener(clickListener);
|
||||
mDisplayOverview = findViewById(R.id.module_ext_id_display_overview);
|
||||
mDisplayOverviewText = findViewById(R.id.module_ext_id_display_overview_text);
|
||||
mMove2CurrentLocation = findViewById(R.id.module_entrance_id_move2_current_location);
|
||||
@@ -211,11 +196,8 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
TopViewNoLinkageAnimHelper.getInstance().init(rootView);
|
||||
}
|
||||
|
||||
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);
|
||||
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(
|
||||
ResourcesHelper.getDimensionPixelSize(getContext(),
|
||||
R.dimen.module_map_display_overview_left_margin),
|
||||
@@ -232,17 +214,12 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
mWeatherTemp = findViewById(R.id.module_ext_id_weather_temp);
|
||||
mMsgContainer = findViewById(R.id.module_ext_id_msg);
|
||||
mMsgCounter = findViewById(R.id.module_ext_id_msg_counter);
|
||||
mUploadButtonAnimatorController = new UploadButtonAnimatorController(mUploading, mUpload,
|
||||
mStatusManager);
|
||||
tvEnterVrMode = findViewById(R.id.module_ext_enter_vr_mode);
|
||||
tvExitVrMode = findViewById(R.id.module_ext_exit_vr_mode);
|
||||
|
||||
tvEnterVrMode.setOnClickListener(clickListener);
|
||||
tvExitVrMode.setOnClickListener(clickListener);
|
||||
mMsgContainer.setOnClickListener(clickListener);
|
||||
mMove2CurrentLocation.setOnClickListener(clickListener);
|
||||
mDisplayOverview.setOnClickListener(clickListener);
|
||||
mExitNavi.setOnClickListener(clickListener);
|
||||
mCameraMode.setOnClickListener(clickListener);
|
||||
|
||||
|
||||
@@ -269,9 +246,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
private Group groupFix;
|
||||
|
||||
private void enterVrMode() {
|
||||
tvEnterVrMode.setVisibility(View.GONE);
|
||||
mMove2CurrentLocation.setVisibility(View.GONE);
|
||||
mUploadRoadCondition.setVisibility(View.GONE);
|
||||
mWeatherContainer.setVisibility(View.GONE);
|
||||
mMsgContainer.setVisibility(View.GONE);
|
||||
// tvExitVrMode.setVisibility(View.VISIBLE);
|
||||
@@ -282,10 +257,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
}
|
||||
|
||||
private void exitVrMode() {
|
||||
EntranceViewHolder.getInstance().forceHideNoticeView();
|
||||
tvEnterVrMode.setVisibility(View.VISIBLE);
|
||||
mMove2CurrentLocation.setVisibility(View.VISIBLE);
|
||||
mUploadRoadCondition.setVisibility(View.VISIBLE);
|
||||
if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isSeekHelping()) {
|
||||
seekHelpGroup.setVisibility(View.VISIBLE);
|
||||
}
|
||||
@@ -298,12 +270,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
}
|
||||
|
||||
private void debugCrashWarn() {
|
||||
|
||||
mUploadRoadCondition.setOnLongClickListener(v -> {
|
||||
mApis.getAdasControllerApi().closeADAS();
|
||||
return true;
|
||||
});
|
||||
|
||||
if (!DebugConfig.isMapBased()) {
|
||||
// 不基于地图的版本需要隐藏一些按钮
|
||||
mMove2CurrentLocation.setVisibility(View.GONE);
|
||||
@@ -386,13 +352,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
}
|
||||
}
|
||||
|
||||
public void showShareDialog() {
|
||||
isClickShare = true;
|
||||
mApis.getShareManager().showShareDialog();
|
||||
traceData("1");
|
||||
|
||||
}
|
||||
|
||||
private static final String AUTONAVI_STANDARD_BROADCAST_RECV =
|
||||
"AUTONAVI_STANDARD_BROADCAST_RECV";
|
||||
|
||||
@@ -453,7 +412,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
TopViewNoLinkageAnimHelper.getInstance().removeAllView();
|
||||
TopViewNoLinkageAnimHelper.getInstance().clear();
|
||||
NoMapTopViewShaderHelper.getInstance().release();
|
||||
EntranceViewHolder.getInstance().release();
|
||||
mCameraLiveNoticeHelper.release();
|
||||
}
|
||||
|
||||
@@ -499,9 +457,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
if (CustomNaviInterrupter.getInstance().interrupt()) {
|
||||
mDisplayOverview.setVisibility(View.GONE);
|
||||
mCameraMode.setVisibility(View.GONE);
|
||||
mExitNavi.setVisibility(View.GONE);
|
||||
} else {
|
||||
mExitNavi.setVisibility(View.VISIBLE);
|
||||
mDisplayOverview.setVisibility(View.VISIBLE);
|
||||
mCameraMode.setVisibility(View.VISIBLE);
|
||||
}
|
||||
@@ -514,7 +470,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
return;
|
||||
}
|
||||
TopViewAnimHelper.getInstance().hideNaviView();
|
||||
mExitNavi.setVisibility(View.GONE);
|
||||
mMApUIController.changeMapMode(EnumMapUI.NorthUP_2D);
|
||||
mDisplayOverview.setVisibility(View.GONE);
|
||||
mCameraMode.setVisibility(View.GONE);
|
||||
@@ -529,22 +484,11 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
public void onLockMap(boolean isLock) {
|
||||
mIsLock = isLock;
|
||||
if (isLock) {
|
||||
mExitNavi.setText(R.string.module_ext_str_exit_navi);
|
||||
if (mStatusManager.isDisplayOverview()) {
|
||||
mStatusManager.setDisplayOverview(TAG, false);
|
||||
}
|
||||
} else {
|
||||
mExitNavi.setText(R.string.module_ext_str_continue_navi);
|
||||
}
|
||||
// if ( isLock ) {
|
||||
// if ( mMApUIController.getCurrentUiMode() == EnumMapUI.CarUp_2D ) {
|
||||
// mMove2CurrentLocation.setImageResource( R.drawable.icon_north_up );
|
||||
// } else {
|
||||
// mMove2CurrentLocation.setImageResource( R.drawable.icon_car_up );
|
||||
// }
|
||||
// } else {
|
||||
// mMove2CurrentLocation.setImageResource( R.drawable.module_map_ic_move2_current_location );
|
||||
// }
|
||||
}
|
||||
|
||||
private void traceData(String from) {
|
||||
@@ -556,19 +500,11 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
@Override
|
||||
public void onStatusChanged(StatusDescriptor descriptor, boolean isTrue) {
|
||||
Logger.d(TAG, "descriptor=" + descriptor + " isTrue=" + isTrue);
|
||||
if (mUploadRoadCondition == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (descriptor == StatusDescriptor.UPLOADING && DebugConfig.isLauncher()) {
|
||||
if (isTrue) {
|
||||
mUploading.setVisibility(View.VISIBLE);
|
||||
mUpload.setVisibility(View.GONE);
|
||||
mUploadButtonAnimatorController.doFrameAnimOnUploadButton();
|
||||
} else {
|
||||
mUploadButtonAnimatorController.stopAnimation();
|
||||
mUploading.setVisibility(View.GONE);
|
||||
mUpload.setVisibility(View.VISIBLE);
|
||||
}
|
||||
} else if (descriptor == StatusDescriptor.DISPLAY_OVERVIEW) {
|
||||
if (!mMogoNavi.isNaviing()) {
|
||||
@@ -707,8 +643,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
}
|
||||
mApis.getSocketManagerApi(getContext()).unregisterOnMessageListener(SEEK_HELP_NOTICE_NUM_MSG_TYPE, seekHelpNoticeListener);
|
||||
}
|
||||
MogoEntranceButtons.clear();
|
||||
|
||||
}
|
||||
|
||||
private Group debugPanelGroup;
|
||||
@@ -775,11 +709,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
private final OnPreventFastClickListener clickListener = new OnPreventFastClickListener() {
|
||||
@Override
|
||||
public void onClickImpl(View v) {
|
||||
if (v.getId() == R.id.module_entrance_id_upload_road_condition) {
|
||||
// 分享按钮点击
|
||||
showShareDialog();
|
||||
playShareGuideVoice();
|
||||
} else if (v.getId() == R.id.module_ext_id_display_overview) {
|
||||
if (v.getId() == R.id.module_ext_id_display_overview) {
|
||||
// 全览按钮点击
|
||||
if (getContext() != null) {
|
||||
// 加此判断是解决下面setDisplayOverview后,本Fragment回调中出现not attached to a context问题
|
||||
@@ -807,27 +737,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
} else {
|
||||
mMApUIController.recoverLockMode();
|
||||
}
|
||||
} else if (v.getId() == R.id.module_entrance_id_exit_navi) {
|
||||
// 退出导航
|
||||
if (mMogoNavi != null) {
|
||||
if (mIsLock) {
|
||||
new WMDialog.Builder(getContext())
|
||||
.setOkButton(R.string.module_commons_button_ok, (dlg, which) -> {
|
||||
dlg.dismiss();
|
||||
mMogoNavi.stopNavi();
|
||||
})
|
||||
.setCancelButton(R.string.module_commons_button_cancel,
|
||||
(dlg, which) -> {
|
||||
dlg.dismiss();
|
||||
})
|
||||
.setContent(R.string.module_commons_exit_navi_content)
|
||||
.build()
|
||||
.show();
|
||||
} else {
|
||||
MapCenterPointStrategy.setMapCenterPointByScene(mMApUIController, Scene.NAVI);
|
||||
mMApUIController.recoverLockMode();
|
||||
}
|
||||
}
|
||||
} else if (v.getId() == R.id.module_ext_id_north) {
|
||||
// 车头朝上 正北朝上
|
||||
if (mCameraMode.isSelected()) {
|
||||
@@ -845,9 +754,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else if (v.getId() == R.id.module_ext_enter_vr_mode) {
|
||||
// 进入vr模式
|
||||
mMApUIController.changeMapMode(EnumMapUI.Type_VR);
|
||||
} else if (v.getId() == R.id.module_ext_exit_vr_mode) {
|
||||
// 退出vr模式
|
||||
mMApUIController.changeMapMode(EnumMapUI.CarUp_2D);
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
package com.mogo.module.extensions.entrance;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths;
|
||||
import com.mogo.module.extensions.utils.EntranceViewHolder;
|
||||
import com.mogo.service.entrance.ButtonIndex;
|
||||
import com.mogo.service.entrance.IMogoEntranceButtonController;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-04-16
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
@Route(path = MogoServicePaths.PATH_ENTRANCE_BUTTON_API)
|
||||
public class MogoEntranceButtonControllerImpl implements IMogoEntranceButtonController {
|
||||
|
||||
@Override
|
||||
public TextView getButton(ButtonIndex index) {
|
||||
return MogoEntranceButtons.getButton(index);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addBottomLayerView(View view, int x, int y) {
|
||||
EntranceViewHolder.getInstance().addBottomLayerView(view, x, y);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeBottomLayerView(View view) {
|
||||
EntranceViewHolder.getInstance().removeBottomLayerView(view);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void showLeftNoticeByType(int noticeType, int iconRes, String content) {
|
||||
EntranceViewHolder.getInstance().showLeftNoticeByType(noticeType, iconRes, content);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hideLeftNoticeByType(int noticeType) {
|
||||
EntranceViewHolder.getInstance().hideLeftNoticeByType(noticeType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(Context context) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addLeftFeatureView(View view) {
|
||||
EntranceViewHolder.getInstance().addLeftFeatureView(view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeLeftFeatureView(View view) {
|
||||
EntranceViewHolder.getInstance().removeLeftFeatureView(view);
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
package com.mogo.module.extensions.entrance;
|
||||
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.mogo.service.entrance.ButtonIndex;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-04-16
|
||||
* <p>
|
||||
* 描述
|
||||
*/
|
||||
public class MogoEntranceButtons {
|
||||
|
||||
private static final Map< ButtonIndex, TextView > sButtons = new HashMap<>();
|
||||
|
||||
public static void save( ButtonIndex index, TextView btn ) {
|
||||
sButtons.put( index, btn );
|
||||
}
|
||||
|
||||
public static TextView getButton( ButtonIndex index ) {
|
||||
return sButtons.get( index );
|
||||
}
|
||||
|
||||
public static void clear() {
|
||||
sButtons.clear();
|
||||
}
|
||||
}
|
||||
@@ -1,287 +0,0 @@
|
||||
package com.mogo.module.extensions.utils;
|
||||
|
||||
import static com.mogo.service.entrance.IMogoEntranceButtonController.NOTICE_TYPE_SEEK_HELP;
|
||||
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.module.common.MogoApisHandler;
|
||||
import com.mogo.module.extensions.R;
|
||||
import com.mogo.module.extensions.bean.BottomLayerViewWrapper;
|
||||
import com.mogo.service.windowview.IMogoEntranceViewListener;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 入口页view管理
|
||||
*
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public class EntranceViewHolder {
|
||||
private static final String TAG = "EntranceViewHolder";
|
||||
|
||||
private EntranceViewHolder() {
|
||||
}
|
||||
|
||||
private volatile static EntranceViewHolder instance = null;
|
||||
|
||||
public static EntranceViewHolder getInstance() {
|
||||
if (instance == null) {
|
||||
synchronized (EntranceViewHolder.class) {
|
||||
if (instance == null) {
|
||||
instance = new EntranceViewHolder();
|
||||
}
|
||||
}
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
private final List<BottomLayerViewWrapper> preAddView = new ArrayList<>();
|
||||
private final List<View> leftFeaturePreAddView = new ArrayList<>();
|
||||
private View preAddLeftNoticeView = null;
|
||||
|
||||
private ViewGroup rootViewGroup = null;
|
||||
private ViewGroup featureViewGroup = null;
|
||||
private ViewGroup leftNoticeContainer = null;
|
||||
|
||||
public void initRootViewGroup(View rootView) {
|
||||
Logger.i(TAG, "initRootViewGroup==");
|
||||
if (rootView instanceof ViewGroup) {
|
||||
Logger.d(TAG, "initRootViewGroup 赋值");
|
||||
rootViewGroup = (ViewGroup) rootView.getParent();
|
||||
leftNoticeContainer =
|
||||
rootView.findViewById(R.id.module_ext_vr_mode_left_notice_container);
|
||||
featureViewGroup = rootView.findViewById(R.id.module_entrance_id_buttons_container);
|
||||
if (!preAddView.isEmpty()) {
|
||||
Logger.d(TAG, "initRootViewGroup 增加底层view: " + preAddView.size());
|
||||
Iterator<BottomLayerViewWrapper> iterator = preAddView.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
BottomLayerViewWrapper wrapper = iterator.next();
|
||||
realAddView(wrapper);
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
if (!leftFeaturePreAddView.isEmpty()) {
|
||||
Logger.d(TAG, "initRootViewGroup 增加左下角FeatureView: " + leftFeaturePreAddView.size());
|
||||
for (View view : leftFeaturePreAddView) {
|
||||
featureViewGroup.addView(view);
|
||||
}
|
||||
}
|
||||
if (preAddLeftNoticeView != null) {
|
||||
realShowLeftNoticeView(preAddLeftNoticeView);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void addBottomLayerView(View view) {
|
||||
Logger.d(TAG, "addBottomLayerView, rootViewGroup is null: " + (rootViewGroup == null));
|
||||
addBottomLayerView(view, 0, 0);
|
||||
}
|
||||
|
||||
public void addBottomLayerView(View view, int x, int y) {
|
||||
Logger.d(TAG, "addBottomLayerView, rootViewGroup is null: " + (rootViewGroup == null) +
|
||||
"\n x: " + x + ", y: " + y);
|
||||
BottomLayerViewWrapper wrapper = new BottomLayerViewWrapper(view, x, y);
|
||||
if (rootViewGroup == null) {
|
||||
if (!preAddView.contains(wrapper)) {
|
||||
preAddView.add(wrapper);
|
||||
}
|
||||
} else {
|
||||
if (!containView(view)) {
|
||||
realAddView(wrapper);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private boolean containView(View view) {
|
||||
int count = rootViewGroup.getChildCount();
|
||||
for (int i = 0; i < count; i++) {
|
||||
if (rootViewGroup.getChildAt(i).equals(view)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean containFeatureView(View view) {
|
||||
int count = featureViewGroup.getChildCount();
|
||||
for (int i = 0; i < count; i++) {
|
||||
if (featureViewGroup.getChildAt(i).equals(view)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 使用的时候需要预先判断rootViewGroup是否为空,本方法默认rootViewGroup不为空
|
||||
*/
|
||||
private void realAddView(BottomLayerViewWrapper wrapper) {
|
||||
FrameLayout.LayoutParams params =
|
||||
new FrameLayout.LayoutParams(FrameLayout.LayoutParams.WRAP_CONTENT,
|
||||
FrameLayout.LayoutParams.WRAP_CONTENT);
|
||||
params.topMargin = wrapper.getY();
|
||||
params.leftMargin = wrapper.getX();
|
||||
View v = wrapper.getView();
|
||||
v.setLayoutParams(params);
|
||||
rootViewGroup.addView(v, 0);
|
||||
// rootViewGroup.setBackgroundColor(Color.WHITE);
|
||||
}
|
||||
|
||||
public void removeBottomLayerView(View view) {
|
||||
if (rootViewGroup != null) {
|
||||
rootViewGroup.removeView(view);
|
||||
}
|
||||
Iterator<BottomLayerViewWrapper> iterator = preAddView.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
BottomLayerViewWrapper wrapper = iterator.next();
|
||||
if (wrapper.getView().equals(view)) {
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void addLeftFeatureView(View view) {
|
||||
Logger.d(TAG, "addLeftFeatureView==" + view);
|
||||
if (featureViewGroup == null) {
|
||||
// 先缓存起来,等待时机加载
|
||||
if (!leftFeaturePreAddView.contains(view)) {
|
||||
leftFeaturePreAddView.add(view);
|
||||
}
|
||||
} else {
|
||||
// 直接加载
|
||||
if (!containFeatureView(view)) {
|
||||
featureViewGroup.addView(view);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void removeLeftFeatureView(View view) {
|
||||
if (featureViewGroup != null) {
|
||||
featureViewGroup.removeView(view);
|
||||
}
|
||||
Iterator<View> iterator = leftFeaturePreAddView.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
View wrapper = iterator.next();
|
||||
if (wrapper.equals(view)) {
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void showLeftNoticeView(View view) {
|
||||
if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode()) {
|
||||
if (leftNoticeContainer != null) {
|
||||
realShowLeftNoticeView(view);
|
||||
} else {
|
||||
preAddLeftNoticeView = view;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void hideLeftNoticeView(View view) {
|
||||
if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode()) {
|
||||
if (preAddLeftNoticeView != null && preAddLeftNoticeView == view) {
|
||||
preAddLeftNoticeView = null;
|
||||
}
|
||||
if (leftNoticeContainer != null) {
|
||||
realHideLeftNoticeView(view);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void forceHideNoticeView() {
|
||||
for (IMogoEntranceViewListener listener : listeners) {
|
||||
listener.onViewRemoved(currentShowNoticeType);
|
||||
}
|
||||
preAddLeftNoticeView = null;
|
||||
currentShowNoticeType = 0;
|
||||
if (leftNoticeContainer != null) {
|
||||
leftNoticeContainer.removeAllViews();
|
||||
}
|
||||
}
|
||||
|
||||
private int currentShowNoticeType = 0;
|
||||
|
||||
public void showLeftNoticeByType(int noticeType, int iconRes, String content) {
|
||||
if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode()) {
|
||||
if (currentShowNoticeType != noticeType && currentShowNoticeType != 0) {
|
||||
for (IMogoEntranceViewListener listener : listeners) {
|
||||
listener.onViewRemoved(currentShowNoticeType);
|
||||
}
|
||||
}
|
||||
currentShowNoticeType = noticeType;
|
||||
if (leftNoticeContainer != null) {
|
||||
realShowLeftNoticeView(generateNoticeViewByType(noticeType, iconRes, content));
|
||||
} else {
|
||||
preAddLeftNoticeView = generateNoticeViewByType(noticeType, iconRes, content);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void hideLeftNoticeByType(int noticeType) {
|
||||
if (MogoApisHandler.getInstance().getApis().getStatusManagerApi().isVrMode()) {
|
||||
if (currentShowNoticeType == noticeType) {
|
||||
forceHideNoticeView();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private View generateNoticeViewByType(int noticeType, int iconRes, String content) {
|
||||
View view =
|
||||
LayoutInflater.from(leftNoticeContainer.getContext()).inflate(R.layout.item_vr_left_notice, leftNoticeContainer, false);
|
||||
ImageView icon = view.findViewById(R.id.module_ext_iv_left_notice_icon);
|
||||
if (noticeType == NOTICE_TYPE_SEEK_HELP) {
|
||||
// 自车求助,是橘色的背景
|
||||
icon.setBackgroundResource(R.drawable.module_ext_left_notice_icon_orange_bg);
|
||||
} else {
|
||||
// 其他是红色背景
|
||||
icon.setBackgroundResource(R.drawable.module_ext_left_notice_icon_red_bg);
|
||||
}
|
||||
icon.setImageResource(iconRes);
|
||||
TextView tvContent = view.findViewById(R.id.module_ext_tv_left_notice_content);
|
||||
tvContent.setText(content);
|
||||
return view;
|
||||
}
|
||||
|
||||
private void realShowLeftNoticeView(View view) {
|
||||
leftNoticeContainer.setVisibility(View.VISIBLE);
|
||||
leftNoticeContainer.removeAllViews();
|
||||
leftNoticeContainer.addView(view);
|
||||
preAddLeftNoticeView = null;
|
||||
for (IMogoEntranceViewListener listener : listeners) {
|
||||
listener.onViewAdded(currentShowNoticeType);
|
||||
}
|
||||
}
|
||||
|
||||
private void realHideLeftNoticeView(View view) {
|
||||
leftNoticeContainer.removeView(view);
|
||||
leftNoticeContainer.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
private final List<IMogoEntranceViewListener> listeners = new ArrayList<>();
|
||||
|
||||
public void addEntranceViewListener(IMogoEntranceViewListener listener) {
|
||||
listeners.add(listener);
|
||||
}
|
||||
|
||||
public void removeEntranceViewListener(IMogoEntranceViewListener listener) {
|
||||
listeners.remove(listener);
|
||||
}
|
||||
|
||||
public void release() {
|
||||
rootViewGroup = null;
|
||||
featureViewGroup = null;
|
||||
leftNoticeContainer = null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -27,95 +27,6 @@
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
tools:ignore="SpeakableTextPresentCheck" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/module_entrance_id_buttons_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/module_common_shadow_width_pos"
|
||||
android:layout_marginBottom="@dimen/module_common_shadow_width_pos"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_entrance_id_button1"
|
||||
android:layout_width="@dimen/module_ext_operation_panel_width"
|
||||
android:layout_height="@dimen/module_ext_operation_panel_width"
|
||||
android:layout_marginLeft="@dimen/module_entrance_id_button_marginLeft"
|
||||
android:background="@drawable/module_ext_drawable_shadow_bg"
|
||||
android:gravity="center"
|
||||
android:padding="0dp"
|
||||
android:text="前方\n实况"
|
||||
android:textColor="@color/module_commons_FFF_333"
|
||||
android:textSize="@dimen/v2x_cancel_help_text_size"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_entrance_id_button2"
|
||||
android:layout_width="@dimen/module_ext_operation_panel_width"
|
||||
android:layout_height="@dimen/module_ext_operation_panel_width"
|
||||
android:layout_marginLeft="@dimen/module_entrance_id_button_marginLeft"
|
||||
android:layout_marginTop="@dimen/module_entrance_id_button_marginTop"
|
||||
android:background="@drawable/module_ext_drawable_shadow_bg"
|
||||
android:gravity="center"
|
||||
android:padding="0dp"
|
||||
android:text="取消\n求助"
|
||||
android:textColor="@color/module_commons_FFF_333"
|
||||
android:textSize="@dimen/v2x_cancel_help_text_size"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_entrance_id_exit_navi"
|
||||
android:layout_width="@dimen/module_ext_navi_exit_width"
|
||||
android:layout_height="@dimen/module_ext_navi_exit_height"
|
||||
android:layout_marginTop="@dimen/module_entrance_id_button_marginTop"
|
||||
android:background="@drawable/module_ext_dw_common_corner_bkg"
|
||||
android:gravity="center"
|
||||
android:text="@string/module_ext_str_exit_navi"
|
||||
android:textColor="@color/module_commons_FFF_333"
|
||||
android:textSize="@dimen/module_ext_navi_exit_textSize"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/module_entrance_id_upload_road_condition"
|
||||
android:layout_width="@dimen/module_ext_operation_panel_share_width"
|
||||
android:layout_height="@dimen/module_ext_operation_panel_share_height"
|
||||
android:layout_marginLeft="@dimen/dp_8"
|
||||
android:layout_marginTop="@dimen/module_entrance_id_button_marginTop"
|
||||
android:layout_marginBottom="@dimen/module_common_btn_bottom"
|
||||
android:background="@drawable/module_ext_dw_upload_road_condition_bkg">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_entrance_id_upload"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:text="@string/module_map_str_upload_road_condition"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/module_ext_operation_panel_share_textSize"
|
||||
android:textStyle="bold"
|
||||
tools:visibility="gone" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/module_entrance_id_uploading"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@drawable/module_ext_ic_uploading_00010"
|
||||
android:textColor="#FFFFFF"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/module_ext_id_top_container_shader"
|
||||
android:layout_width="match_parent"
|
||||
@@ -195,21 +106,6 @@
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_ext_enter_vr_mode"
|
||||
android:layout_width="@dimen/module_ext_operation_panel_share_width"
|
||||
android:layout_height="@dimen/module_ext_operation_panel_share_height"
|
||||
android:layout_marginRight="@dimen/module_common_shadow_width_pos"
|
||||
android:layout_marginBottom="@dimen/module_ext_enter_vr_mode_margin_bottom"
|
||||
android:background="@drawable/module_ext_dw_upload_road_condition_bkg"
|
||||
android:gravity="center"
|
||||
android:text="VR"
|
||||
android:textColor="#fff"
|
||||
android:textSize="@dimen/module_ext_enter_vr_mode_text_size"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toTopOf="@+id/module_entrance_id_move2_current_location"
|
||||
app:layout_constraintRight_toRightOf="@+id/module_entrance_id_move2_current_location" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_ext_exit_vr_mode"
|
||||
android:layout_width="@dimen/module_ext_operation_panel_width"
|
||||
|
||||
@@ -3,14 +3,10 @@ package com.mogo.module.service.intent;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Color;
|
||||
import android.net.Uri;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.mogo.cloud.commons.utils.CoordinateUtils;
|
||||
import com.mogo.cloud.socket.entity.SocketDownData;
|
||||
@@ -26,6 +22,8 @@ import com.mogo.eagle.core.data.traffic.TrafficData;
|
||||
import com.mogo.eagle.core.network.utils.GsonUtil;
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.Logger;
|
||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
||||
import com.mogo.eagle.core.utilcode.mogo.thread.WorkThreadHandler;
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast;
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils;
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
@@ -46,11 +44,7 @@ import com.mogo.module.common.drawer.IdentifyDataDrawer;
|
||||
import com.mogo.module.common.drawer.SnapshotSetDataDrawer;
|
||||
import com.mogo.module.service.MarkerServiceHandler;
|
||||
import com.mogo.module.service.R;
|
||||
import com.mogo.module.service.status.EnvStatusManager;
|
||||
import com.mogo.module.service.timedelay.TimeDelayUploadManager;
|
||||
import com.mogo.service.entrance.ButtonIndex;
|
||||
import com.mogo.eagle.core.utilcode.mogo.toast.TipToast;
|
||||
import com.mogo.eagle.core.utilcode.mogo.thread.WorkThreadHandler;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
@@ -95,46 +89,10 @@ public class MockIntentHandler implements IntentHandler {
|
||||
TipToast.shortTip(msg);
|
||||
}
|
||||
break;
|
||||
case 4:// 测试左侧按钮1
|
||||
TextView button1 = MarkerServiceHandler.getApis().getEntranceButtonController().getButton(ButtonIndex.BUTTON1);
|
||||
if (button1 != null) {
|
||||
button1.setVisibility(View.VISIBLE);
|
||||
button1.setBackgroundColor(Color.RED);
|
||||
button1.setOnClickListener(view -> {
|
||||
});
|
||||
}
|
||||
break;
|
||||
case 5:// 测试左侧按钮2
|
||||
TextView button2 = MarkerServiceHandler.getApis().getEntranceButtonController().getButton(ButtonIndex.BUTTON2);
|
||||
if (button2 != null) {
|
||||
button2.setOnClickListener(null);
|
||||
button2.setVisibility(View.GONE);
|
||||
}
|
||||
break;
|
||||
case 6://
|
||||
boolean status1 = intent.getBooleanExtra("status", false);
|
||||
MarkerServiceHandler.getMogoStatusManager().setUploadingStatus(TAG, status1);
|
||||
break;
|
||||
case 7:// 打开微信
|
||||
TextView button11 = MarkerServiceHandler.getApis().getEntranceButtonController().getButton(ButtonIndex.BUTTON1);
|
||||
if (button11 != null) {
|
||||
button11.setVisibility(View.VISIBLE);
|
||||
button11.setBackgroundColor(Color.RED);
|
||||
button11.setOnClickListener(view -> {
|
||||
Intent intent1 = new Intent();
|
||||
intent1.setAction(Intent.ACTION_VIEW);
|
||||
intent1.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
intent1.setData(Uri.parse("wechathelper://com.zhidao.wechathelper/main/transform?type=navi&lon=116.327007&lat=39.977639&from=os2.0"));
|
||||
try {
|
||||
view.setOnClickListener(null);
|
||||
view.getContext().startActivity(intent1);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
view.setVisibility(View.GONE);
|
||||
});
|
||||
}
|
||||
break;
|
||||
case 8:// 测试修改车头角度
|
||||
float bearing = intent.getFloatExtra("bearing", 0);
|
||||
MarkerServiceHandler.getMapUIController().changeBearing(bearing);
|
||||
|
||||
@@ -11,7 +11,6 @@ import com.mogo.service.cloud.passport.IMogoPassportManager;
|
||||
import com.mogo.service.cloud.socket.IMogoSocketManager;
|
||||
import com.mogo.service.cloud.socket.IMogoWebSocketManager;
|
||||
import com.mogo.service.datamanager.IMogoDataManager;
|
||||
import com.mogo.service.entrance.IMogoEntranceButtonController;
|
||||
import com.mogo.service.eventpanel.IEventPanelProvider;
|
||||
import com.mogo.service.fragmentmanager.IMogoFragmentManager;
|
||||
import com.mogo.service.imageloader.IMogoImageloader;
|
||||
@@ -22,7 +21,6 @@ import com.mogo.service.module.IMogoActionManager;
|
||||
import com.mogo.service.module.IMogoMarkerService;
|
||||
import com.mogo.service.module.IMogoRegisterCenter;
|
||||
import com.mogo.service.network.IMogoNetwork;
|
||||
import com.mogo.service.obu.IMogoCrashWarnProvider;
|
||||
import com.mogo.service.share.IMogoShareManager;
|
||||
import com.mogo.service.share.IMogoTanluProvider;
|
||||
import com.mogo.service.share.IMogoTanluUiProvider;
|
||||
@@ -161,13 +159,6 @@ public interface IMogoServiceApis extends IProvider {
|
||||
IMogoRefreshStrategyController getRefreshStrategyControllerApi();
|
||||
|
||||
|
||||
/**
|
||||
* 获取入口按钮控制器
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
IMogoEntranceButtonController getEntranceButtonController();
|
||||
|
||||
/**
|
||||
* 获取顶部1/2屏界面管理类
|
||||
*
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.mogo.service.entrance;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-04-16
|
||||
* <p>
|
||||
* 入口按钮顺序:从上到下
|
||||
*/
|
||||
public enum ButtonIndex {
|
||||
|
||||
/**
|
||||
* 第一个
|
||||
*/
|
||||
BUTTON1,
|
||||
|
||||
/**
|
||||
* 第二个
|
||||
*/
|
||||
BUTTON2;
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
package com.mogo.service.entrance;
|
||||
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-04-16
|
||||
* <p>
|
||||
* 入口按钮
|
||||
*/
|
||||
public interface IMogoEntranceButtonController extends IProvider {
|
||||
/**
|
||||
* 自车求助
|
||||
*/
|
||||
int NOTICE_TYPE_SEEK_HELP = 1007;
|
||||
|
||||
/**
|
||||
* 获取入口按钮实例
|
||||
*
|
||||
* @param index
|
||||
* @return
|
||||
*/
|
||||
TextView getButton(ButtonIndex index);
|
||||
|
||||
/**
|
||||
* 添加低层级view,使用ViewGroup.addView(v,0)实现
|
||||
* 可指定x,y位置
|
||||
*
|
||||
* @param view 将要添加的view
|
||||
* @param x leftMargin
|
||||
* @param y topMargin
|
||||
*/
|
||||
void addBottomLayerView(View view, int x, int y);
|
||||
|
||||
/**
|
||||
* 移除对应的底层view
|
||||
*
|
||||
* @param view 待移除view
|
||||
*/
|
||||
void removeBottomLayerView(View view);
|
||||
|
||||
/**
|
||||
* 添加左下角功能View,按顺序添加到最底端
|
||||
*
|
||||
* @param view 待添加view
|
||||
*/
|
||||
void addLeftFeatureView(View view);
|
||||
|
||||
/**
|
||||
* 移除左下角功能按钮
|
||||
*
|
||||
* @param view 待移除view
|
||||
*/
|
||||
void removeLeftFeatureView(View view);
|
||||
|
||||
/**
|
||||
* 根据noticeType添加左侧提示
|
||||
*
|
||||
* @param noticeType {@link #NOTICE_TYPE_SEEK_HELP}...
|
||||
* @param iconRes 本地 icon res
|
||||
* @param content 提示内容
|
||||
*/
|
||||
void showLeftNoticeByType(int noticeType, int iconRes, String content);
|
||||
|
||||
/**
|
||||
* 移除noticeType,需要与{@link #showLeftNoticeByType(int, int, String)}成对使用
|
||||
*
|
||||
* @param noticeType {@link #NOTICE_TYPE_SEEK_HELP}...
|
||||
*/
|
||||
void hideLeftNoticeByType(int noticeType);
|
||||
|
||||
}
|
||||
@@ -16,7 +16,6 @@ import com.mogo.service.cloud.passport.IMogoPassportManager;
|
||||
import com.mogo.service.cloud.socket.IMogoSocketManager;
|
||||
import com.mogo.service.cloud.socket.IMogoWebSocketManager;
|
||||
import com.mogo.service.datamanager.IMogoDataManager;
|
||||
import com.mogo.service.entrance.IMogoEntranceButtonController;
|
||||
import com.mogo.service.eventpanel.IEventPanelProvider;
|
||||
import com.mogo.service.fragmentmanager.IMogoFragmentManager;
|
||||
import com.mogo.service.imageloader.IMogoImageloader;
|
||||
@@ -149,11 +148,6 @@ public class MogoServiceApis implements IMogoServiceApis {
|
||||
return getApiInstance(IMogoRefreshStrategyController.class, MogoServicePaths.PATH_REFRESH_STRATEGY_API);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoEntranceButtonController getEntranceButtonController() {
|
||||
return getApiInstance(IMogoEntranceButtonController.class, MogoServicePaths.PATH_ENTRANCE_BUTTON_API);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMogoTopViewManager getTopViewManager() {
|
||||
return getApiInstance(IMogoTopViewManager.class, MogoServicePaths.PATH_EXTENSIONS_TOP_VIEW_MANAGER);
|
||||
|
||||
Reference in New Issue
Block a user