diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/SOPSettingView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/SOPSettingView.kt index 055e8ea5ae..5479ed816c 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/SOPSettingView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/SOPSettingView.kt @@ -81,6 +81,7 @@ import kotlinx.android.synthetic.main.view_sop_setting.view.scV2XSwitch import kotlinx.android.synthetic.main.view_sop_setting.view.scV2iPnc import kotlinx.android.synthetic.main.view_sop_setting.view.scV2nPnc import kotlinx.android.synthetic.main.view_sop_setting.view.scWeakNetSlowDown +import kotlinx.android.synthetic.main.view_sop_setting.view.scWeatherSwitch import kotlinx.android.synthetic.main.view_sop_setting.view.sopLayout import kotlinx.android.synthetic.main.view_sop_setting.view.tvOverTakeLimit import kotlinx.android.synthetic.main.view_sop_setting.view.tvPullTimeTitle @@ -737,6 +738,17 @@ internal class SOPSettingView @JvmOverloads constructor( } } + scWeatherSwitch?.also { + if (!AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) { + it.visibility = GONE + } else { + it.visibility = VISIBLE + it.setOnCheckedChangeListener { _, isChecked -> + CallerMapUIServiceManager.getMapUIController()?.setWeatherEnable(isChecked) + } + } + } + // 清扫车业务模式切换 scSweeperModeSwitch?.also { switchView -> switchView.isChecked = diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_sop_setting.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_sop_setting.xml index 3824188819..7cf8c1dab1 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_sop_setting.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_sop_setting.xml @@ -757,6 +757,20 @@ app:layout_constraintRight_toRightOf="@id/otherGuideLine" app:layout_constraintTop_toBottomOf="@id/scNew360LookAround" /> + + +