[Upgrade module]针对Fragment 增加getTagName ,后续涉及到的Fragment进行重构加载方式

Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
donghongyu
2021-11-09 18:51:27 +08:00
parent ec2c92fd33
commit c8f8a3d3bb
24 changed files with 220 additions and 6 deletions

View File

@@ -58,6 +58,10 @@ class MoGoHmiFragment : MvpFragment<MoGoWarningContract.View?, WaringPresenter?>
return R.layout.fragment_hmi
}
override fun getTagName(): String {
return TAG
}
override fun createPresenter(): WaringPresenter {
return WaringPresenter(this)
}

View File

@@ -0,0 +1,41 @@
package com.mogo.eagle.core.function.map;
import androidx.annotation.NonNull;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.mogo.commons.mvp.MvpFragment;
import com.mogo.eagle.core.data.constants.MoGoFragmentPaths;
import com.mogo.utils.logger.Logger;
/**
* @author donghongyu
* @since 2021-11-09
* 高精度地图层UI
*/
@Route(path = MoGoFragmentPaths.PATH_FRAGMENT_MAP)
public class MoGoHDMapFragment extends MvpFragment<MoGoMapView, MoGoMapPresenter> implements MoGoMapView {
private static final String TAG = "MoGoHDMapFragment";
@Override
protected int getLayoutId() {
return R.layout.function_map_fragment_hd_map;
}
@Override
public String getTagName() {
return TAG;
}
@Override
protected void initViews() {
Logger.d(TAG, "initViews");
}
@NonNull
@Override
protected MoGoMapPresenter createPresenter() {
return new MoGoMapPresenter(this);
}
}

View File

@@ -0,0 +1,9 @@
package com.mogo.eagle.core.function.map;
import com.mogo.commons.mvp.Presenter;
public class MoGoMapPresenter extends Presenter<MoGoMapView> {
public MoGoMapPresenter(MoGoMapView view) {
super(view);
}
}

View File

@@ -0,0 +1,6 @@
package com.mogo.eagle.core.function.map;
import com.mogo.commons.mvp.IView;
public interface MoGoMapView extends IView {
}

View File

@@ -0,0 +1,11 @@
<?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">
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FFF" />
</androidx.constraintlayout.widget.ConstraintLayout>