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" />