From bb1baa023baad86a0a453c42633cf740af53e733 Mon Sep 17 00:00:00 2001 From: donghongyu Date: Wed, 13 Apr 2022 21:30:51 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=8CChange=E3=80=8D=201=E3=80=81=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E7=99=BD=E5=A4=A9=E5=A4=9C=E9=97=B4=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E5=88=87=E6=8D=A2=20=E8=BF=9B=E5=85=A5=E7=99=BD=E5=A4=A9?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=20=20CallerMoGoUiSettingManager.stepInDayMod?= =?UTF-8?q?e()=20=E9=80=80=E5=87=BA=E7=99=BD=E5=A4=A9=E6=A8=A1=E5=BC=8F=20?= =?UTF-8?q?=20CallerMoGoUiSettingManager.stepOutDayMode()=20=E7=9B=91?= =?UTF-8?q?=E5=90=AC=E6=8D=A2=E8=82=A4=E6=A8=A1=E5=BC=8F=E5=88=87=E6=8D=A2?= =?UTF-8?q?=EF=BC=8C=E9=9C=80=E8=A6=81=E5=AE=9E=E7=8E=B0IMoGoSkinModeChang?= =?UTF-8?q?eListener=E6=8E=A5=E5=8F=A3=20CallerSkinModeListenerManager.INS?= =?UTF-8?q?TANCE.addListener(TAG,=20this);=20=E7=A7=BB=E9=99=A4=E6=8D=A2?= =?UTF-8?q?=E8=82=A4=E6=A8=A1=E5=BC=8F=E5=88=87=E6=8D=A2=202=E3=80=81?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=87=E6=8D=A2=E7=99=BD=E5=A4=A9=E3=80=81?= =?UTF-8?q?=E9=BB=91=E5=A4=9C=E6=A8=A1=E5=BC=8F=E5=8F=98=E6=8D=A2=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E6=A0=8F=E6=96=87=E5=AD=97=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: donghongyu --- .../hmi/ui/setting/DebugSettingView.kt | 11 +- .../function/main/MainLauncherActivity.java | 17 ++- .../main/res/layout/view_debug_setting.xml | 99 ++++++++--------- .../core/function/map/IdentifyDataDrawer.java | 42 -------- .../eagle/core/function/map/MapFragment.java | 18 +++- .../eagle/core/data/enums/TrafficTypeEnum.kt | 13 ++- core/mogo-core-function-api/build.gradle | 3 +- .../api/setting/IMoGoMapModeChangeListener.kt | 17 +++ .../setting/IMoGoSkinModeChangeListener.kt | 14 +++ .../api/setting/MoGoUiSettingProvider.kt | 36 +++++++ .../setting/CallerMoGoUiSettingManager.kt | 43 ++++++++ .../setting/CallerSkinModeListenerManager.kt | 75 +++++++++++++ .../src/main/res/raw/traffic_daba_day.nt3d | Bin 0 -> 1123560 bytes .../main/res/raw/traffic_motuoche_day.nt3d | Bin 0 -> 1070102 bytes .../src/main/res/raw/traffic_people_day.nt3d | Bin 0 -> 728092 bytes .../res/raw/traffic_tachexiaoche_day.nt3d | Bin 0 -> 1249161 bytes .../src/main/res/raw/traffic_ziche_day.nt3d | Bin 0 -> 1818114 bytes .../main/res/raw/traffic_zixingche_day.nt3d | Bin 0 -> 1475330 bytes .../uicontroller/IMogoMapUIController.java | 15 --- .../java/com/mogo/map/AMapViewWrapper.java | 102 ++++++++++++------ .../com/mogo/map/MogoMapUIController.java | 15 --- .../map/uicontroller/AMapUIController.java | 13 --- 22 files changed, 353 insertions(+), 180 deletions(-) create mode 100644 core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/setting/IMoGoMapModeChangeListener.kt create mode 100644 core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/setting/IMoGoSkinModeChangeListener.kt create mode 100644 core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/setting/MoGoUiSettingProvider.kt create mode 100644 core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/setting/CallerMoGoUiSettingManager.kt create mode 100644 core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/setting/CallerSkinModeListenerManager.kt create mode 100644 core/mogo-core-res/src/main/res/raw/traffic_daba_day.nt3d create mode 100644 core/mogo-core-res/src/main/res/raw/traffic_motuoche_day.nt3d create mode 100644 core/mogo-core-res/src/main/res/raw/traffic_people_day.nt3d create mode 100644 core/mogo-core-res/src/main/res/raw/traffic_tachexiaoche_day.nt3d create mode 100644 core/mogo-core-res/src/main/res/raw/traffic_ziche_day.nt3d create mode 100644 core/mogo-core-res/src/main/res/raw/traffic_zixingche_day.nt3d diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt index 1f7d3de420..c8760bf959 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt @@ -40,6 +40,7 @@ import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager import com.mogo.eagle.core.function.call.map.CallerSmpManager import com.mogo.eagle.core.function.call.obu.CallerOBUManager import com.mogo.eagle.core.function.call.obu.CallerObuListenerManager +import com.mogo.eagle.core.function.call.setting.CallerMoGoUiSettingManager import com.mogo.eagle.core.function.call.telematic.CallerTelematicManager import com.mogo.eagle.core.function.hmi.R import com.mogo.eagle.core.function.hmi.ui.logcatch.ILogViewListener @@ -460,10 +461,14 @@ class DebugSettingView @JvmOverloads constructor( /** - * 修改地图样式按钮(白天模式、夜间模式) + * 修改皮肤样式按钮(白天模式、夜间模式) */ - tbChangeCurrentMapStyle.setOnCheckedChangeListener { _, isChecked -> - CallerHDMapManager.stepInVrMode(isChecked) + tbChangeCurrentSkinMode.setOnCheckedChangeListener { _, isChecked -> + if (isChecked) { + CallerMoGoUiSettingManager.stepInDayMode() + } else { + CallerMoGoUiSettingManager.stepOutDayMode() + } } //设置鹰眼本地参数配置监听 diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainLauncherActivity.java b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainLauncherActivity.java index c4a7e2b5aa..b95c2c482a 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainLauncherActivity.java +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/main/MainLauncherActivity.java @@ -15,9 +15,12 @@ import com.alibaba.android.arouter.launcher.ARouter; import com.mogo.commons.debug.DebugConfig; import com.mogo.eagle.core.data.config.FunctionBuildConfig; import com.mogo.eagle.core.function.api.base.IMoGoFunctionProvider; +import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener; +import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager; import com.mogo.eagle.core.function.hmi.R; import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils; import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; +import com.mogo.eagle.core.utilcode.util.BarUtils; import com.mogo.service.intent.IMogoIntentListener; /** @@ -25,7 +28,7 @@ import com.mogo.service.intent.IMogoIntentListener; * * @author tongchenfei */ -public class MainLauncherActivity extends MainActivity implements IMogoIntentListener { +public class MainLauncherActivity extends MainActivity implements IMogoIntentListener, IMoGoSkinModeChangeListener { private static final String TAG = "MainLauncherActivity"; protected boolean mIsHomeKeyDown = false; private final static Handler handlerV2XEvent = new Handler(); @@ -54,6 +57,8 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis protected void onStart() { super.onStart(); getApis().getIntentManagerApi().registerIntentListener(Intent.ACTION_CLOSE_SYSTEM_DIALOGS, this); + // 添加换肤监听 + CallerSkinModeListenerManager.INSTANCE.addListener(TAG, this); //ActivityLifecycleManager.getInstance().setAppActive(true); } @@ -106,6 +111,8 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis } catch (Exception e) { e.printStackTrace(); } + // 移除换肤监听 + CallerSkinModeListenerManager.INSTANCE.removeListener(TAG); } private void stopCountDown() { @@ -115,4 +122,12 @@ public class MainLauncherActivity extends MainActivity implements IMogoIntentLis } } + @Override + public void onSkinModeChange(int skinMode) { + if (skinMode == 0) { + BarUtils.setStatusBarLightMode(this, false); + } else { + BarUtils.setStatusBarLightMode(this, true); + } + } } diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml index a1ff2860b7..e5cc4ff123 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_debug_setting.xml @@ -701,8 +701,7 @@ android:drawableEnd="@drawable/icon_right" android:padding="@dimen/dp_20" android:textOff="车辆状态" - android:textOn="车辆状态" - /> + android:textOn="车辆状态" /> + android:text="方向盘转向角:" /> + android:text="挂挡档位:" /> + app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintTop_toBottomOf="@id/btnBrakeThreshold" />