@@ -1,37 +1,36 @@
|
||||
package com.mogo.eagle.core.function.api.base;
|
||||
package com.mogo.eagle.core.function.api.base
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
import android.content.Context
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.alibaba.android.arouter.facade.template.IProvider
|
||||
|
||||
/**
|
||||
* @author xiaoyuzhou
|
||||
* @date 2021/9/16 4:40 下午
|
||||
* 功能提供者基础
|
||||
*/
|
||||
public interface IMoGoFunctionProvider extends IProvider {
|
||||
interface IMoGoFunctionProvider : IProvider {
|
||||
/**
|
||||
* 创建图层,如果功能需要在HMI单独创建新的图层才需要实现
|
||||
*
|
||||
* @param context 上下文
|
||||
* @return 图层Fragment
|
||||
*/
|
||||
Fragment createCoverage(Context context, Bundle data);
|
||||
fun createCoverage(context: Context?, data: Bundle?): Fragment?
|
||||
|
||||
/**
|
||||
* 功能模块唯一标识
|
||||
*
|
||||
* @return 功能模块名称
|
||||
*/
|
||||
@NonNull
|
||||
String getFunctionName();
|
||||
val functionName: String
|
||||
|
||||
default void onDestroy() {
|
||||
Log.d("IMoGoFunctionProvider", "onDestroy");
|
||||
/**
|
||||
* 功能销毁回调
|
||||
*/
|
||||
fun onDestroy() {
|
||||
Log.d("IMoGoFunctionProvider", "onDestroy")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package com.mogo.module.hmi.warning;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -108,4 +109,9 @@ public class MoGoWarningProvider implements IMoGoWaringProvider {
|
||||
public void showWarning(@NonNull WarningDirectionEnum direction, long closeTime) {
|
||||
mMoGoWarningFragment.showWarning(direction, closeTime);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
Log.d(TAG, "onDestroy");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user