Complete mogo-module-warning fragment show
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.mogo.module.hmi">
|
||||
package="com.mogo.module.warning">
|
||||
|
||||
</manifest>
|
||||
@@ -1,10 +1,13 @@
|
||||
package com.mogo.module.warning;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.module.warning.ui.MoGoWarningFragment;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.service.warning.IMoGoWaringProvider;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
@@ -18,15 +21,26 @@ import com.mogo.utils.logger.Logger;
|
||||
public class MoGoWarningProvider implements IMoGoWaringProvider {
|
||||
private String TAG = "MoGoWarningProvider";
|
||||
|
||||
|
||||
@Override
|
||||
public void init(FragmentActivity activity, int containerId) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(Context context) {
|
||||
Logger.d(TAG, "初始化蘑菇预警模块……");
|
||||
Logger.d(TAG, "初始化蘑菇预警模块 ……");
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Fragment createFragment(Context context, Bundle data) {
|
||||
Logger.d(TAG, "初始化蘑菇预警模块 Fragment……");
|
||||
return new MoGoWarningFragment();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public String getModuleName() {
|
||||
return WaringConst.MODULE_NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getType() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.mogo.module.warning;
|
||||
|
||||
/**
|
||||
* @author xiaoyuzhou
|
||||
* @date 2021/8/3 4:26 下午
|
||||
*/
|
||||
public class WaringConst {
|
||||
public static String MODULE_NAME = "MODULE_LEFT_PANEL";
|
||||
public static String PATH_NAME = "/left/panel";
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.mogo.module.warning.ui;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.module.warning.R;
|
||||
|
||||
/**
|
||||
* @author xiaoyuzhou
|
||||
* @date 2021/8/3 2:40 下午
|
||||
*/
|
||||
public class MoGoWarningFragment extends MvpFragment<WaringView, WaringPresenter> implements WaringView {
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.fragment_warning;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initViews() {
|
||||
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
protected WaringPresenter createPresenter() {
|
||||
return new WaringPresenter(this);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.mogo.module.warning.ui;
|
||||
|
||||
import com.mogo.commons.mvp.Presenter;
|
||||
|
||||
/**
|
||||
* @author xiaoyuzhou
|
||||
* @date 2021/8/3 3:55 下午
|
||||
*/
|
||||
public class WaringPresenter extends Presenter< WaringView > {
|
||||
public WaringPresenter(WaringView view) {
|
||||
super(view);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.mogo.module.warning.ui;
|
||||
|
||||
import com.mogo.commons.mvp.IView;
|
||||
|
||||
/**
|
||||
* @author xiaoyuzhou
|
||||
* @date 2021/8/3 3:54 下午
|
||||
*/
|
||||
public interface WaringView extends IView {
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
Reference in New Issue
Block a user