[6.7.0][启自驾] feat: 增加启自驾父容器 View;
feat: 增驾调用 Och 自定义 view 接口&provider ;
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
package com.mogo.eagle.core.function.call.och
|
||||
|
||||
import android.content.Context
|
||||
import android.view.View
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.mogo.eagle.core.data.constants.MogoServicePaths
|
||||
import com.mogo.eagle.core.function.api.och.IOchCustomViewProvider
|
||||
|
||||
/**
|
||||
* @author aibingbing
|
||||
*
|
||||
* Och自定义View调用者管理类,用来获取 Och提供的自定义 View, 然后放入到底层框架
|
||||
*/
|
||||
object CallerOchCustomViewManager {
|
||||
const val TAG = "CallerOchCustomViewManager"
|
||||
|
||||
private val ochCustomViewProviderApi
|
||||
get() = ARouter.getInstance().build(MogoServicePaths.PATH_OCH_CUSTOM_VIEW_API)
|
||||
.navigation() as? IOchCustomViewProvider
|
||||
|
||||
fun init(context: Context) {
|
||||
ochCustomViewProviderApi?.init(context)
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建 Och业务层 自定义View
|
||||
*/
|
||||
fun getOchBusinessView(context: Context?): View? {
|
||||
return ochCustomViewProviderApi?.createOchBusinessView(context)
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建 自动自动驾驶 自定义 View
|
||||
*/
|
||||
fun getAutopilotView(context: Context?): View? {
|
||||
return ochCustomViewProviderApi?.createStartAutopilotView(context)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user