[6.5.0] 添加页面切换时主动获取页面状态的功能
This commit is contained in:
@@ -18,6 +18,7 @@ import com.mogo.commons.voice.AIAssist
|
|||||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
||||||
import com.mogo.eagle.core.function.api.map.road.IMoGoMapRoadListener
|
import com.mogo.eagle.core.function.api.map.road.IMoGoMapRoadListener
|
||||||
|
import com.mogo.eagle.core.function.call.autopilot.CallerV2nNioEventListenerManager
|
||||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||||
import com.mogo.eagle.core.function.call.map.CallerMapIdentifyManager
|
import com.mogo.eagle.core.function.call.map.CallerMapIdentifyManager
|
||||||
import com.mogo.eagle.core.function.call.map.CallerMapRoadListenerManager
|
import com.mogo.eagle.core.function.call.map.CallerMapRoadListenerManager
|
||||||
@@ -134,6 +135,10 @@ class RoadCrossRoamView @JvmOverloads constructor(
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if(CallerHmiViewControlListenerManager.getMainPageVisible()){
|
||||||
|
CallerLogger.d("$M_MAP$TAG", "attachView return , mainPageVisible is false")
|
||||||
|
return
|
||||||
|
}
|
||||||
bringToFront()
|
bringToFront()
|
||||||
CallerMapIdentifyManager.roam = Pair(TAG, true)
|
CallerMapIdentifyManager.roam = Pair(TAG, true)
|
||||||
this.visibility = View.VISIBLE
|
this.visibility = View.VISIBLE
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.mogo.eagle.core.function.call.hmi
|
package com.mogo.eagle.core.function.call.hmi
|
||||||
|
|
||||||
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
||||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotActionsListenerManager
|
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotActionsListenerManager
|
||||||
@@ -12,6 +13,8 @@ import com.mogo.eagle.core.function.call.base.CallerBase
|
|||||||
*/
|
*/
|
||||||
object CallerHmiViewControlListenerManager : CallerBase<IViewControlListener>() {
|
object CallerHmiViewControlListenerManager : CallerBase<IViewControlListener>() {
|
||||||
|
|
||||||
|
private var mainPageVisible = true
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 触发 view 显示隐藏
|
* 触发 view 显示隐藏
|
||||||
* @param v 显示/隐藏状态
|
* @param v 显示/隐藏状态
|
||||||
@@ -21,12 +24,17 @@ object CallerHmiViewControlListenerManager : CallerBase<IViewControlListener>()
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun invokeMainPageViewVisible(v: Int) {
|
fun invokeMainPageViewVisible(v: Int) {
|
||||||
|
mainPageVisible = (v == View.VISIBLE)
|
||||||
M_LISTENERS.forEach {
|
M_LISTENERS.forEach {
|
||||||
val listener = it.value
|
val listener = it.value
|
||||||
listener.mainPageViewVisible(v)
|
listener.mainPageViewVisible(v)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun getMainPageVisible(): Boolean {
|
||||||
|
return mainPageVisible
|
||||||
|
}
|
||||||
|
|
||||||
fun setStatusBarDarkOrLight(tag: String, light: Boolean) {
|
fun setStatusBarDarkOrLight(tag: String, light: Boolean) {
|
||||||
M_LISTENERS[tag]?.setStatusBarDarkOrLight(light)
|
M_LISTENERS[tag]?.setStatusBarDarkOrLight(light)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user