From 054d0cf99b52e37500800184ec097585e2e38bb1 Mon Sep 17 00:00:00 2001 From: Sachin Rana Date: Tue, 4 Jan 2022 19:07:03 +0530 Subject: [PATCH] Template support for Android studio v3.6 --- template/MVPActivity_AS_v3.6/globals.xml.ftl | 7 ++ template/MVPActivity_AS_v3.6/recipe.xml.ftl | 29 ++++++++ .../root/res/layout/activity.xml.ftl | 9 +++ .../root/src/app_package/Activity.java.ftl | 40 +++++++++++ .../src/app_package/MvpPresenter.java.ftl | 7 ++ .../root/src/app_package/Presenter.java.ftl | 21 ++++++ .../root/src/app_package/View.java.ftl | 6 ++ template/MVPActivity_AS_v3.6/template.xml | 67 ++++++++++++++++++ .../template_blank_activity.png | Bin 0 -> 4594 bytes 9 files changed, 186 insertions(+) create mode 100644 template/MVPActivity_AS_v3.6/globals.xml.ftl create mode 100644 template/MVPActivity_AS_v3.6/recipe.xml.ftl create mode 100644 template/MVPActivity_AS_v3.6/root/res/layout/activity.xml.ftl create mode 100644 template/MVPActivity_AS_v3.6/root/src/app_package/Activity.java.ftl create mode 100644 template/MVPActivity_AS_v3.6/root/src/app_package/MvpPresenter.java.ftl create mode 100644 template/MVPActivity_AS_v3.6/root/src/app_package/Presenter.java.ftl create mode 100644 template/MVPActivity_AS_v3.6/root/src/app_package/View.java.ftl create mode 100644 template/MVPActivity_AS_v3.6/template.xml create mode 100644 template/MVPActivity_AS_v3.6/template_blank_activity.png diff --git a/template/MVPActivity_AS_v3.6/globals.xml.ftl b/template/MVPActivity_AS_v3.6/globals.xml.ftl new file mode 100644 index 0000000..32541ee --- /dev/null +++ b/template/MVPActivity_AS_v3.6/globals.xml.ftl @@ -0,0 +1,7 @@ + + + + + + <#include "../common/common_globals.xml.ftl" /> + diff --git a/template/MVPActivity_AS_v3.6/recipe.xml.ftl b/template/MVPActivity_AS_v3.6/recipe.xml.ftl new file mode 100644 index 0000000..95859f4 --- /dev/null +++ b/template/MVPActivity_AS_v3.6/recipe.xml.ftl @@ -0,0 +1,29 @@ + +<#import "root://activities/common/kotlin_macros.ftl" as kt> + + <#include "../common/recipe_manifest.xml.ftl" /> + <@kt.addAllKotlinDependencies /> + + + + + <#if generateKotlin && useAndroidX> + + + + + + + + + + + + + + \ No newline at end of file diff --git a/template/MVPActivity_AS_v3.6/root/res/layout/activity.xml.ftl b/template/MVPActivity_AS_v3.6/root/res/layout/activity.xml.ftl new file mode 100644 index 0000000..cb27938 --- /dev/null +++ b/template/MVPActivity_AS_v3.6/root/res/layout/activity.xml.ftl @@ -0,0 +1,9 @@ + + + + diff --git a/template/MVPActivity_AS_v3.6/root/src/app_package/Activity.java.ftl b/template/MVPActivity_AS_v3.6/root/src/app_package/Activity.java.ftl new file mode 100644 index 0000000..336fac5 --- /dev/null +++ b/template/MVPActivity_AS_v3.6/root/src/app_package/Activity.java.ftl @@ -0,0 +1,40 @@ +package ${packageName}.${folderName}; + +import android.os.Bundle; +import javax.inject.Inject; +import butterknife.ButterKnife; +import com.mindorks.framework.mvp.ui.base.BaseActivity; +import android.content.Intent; +import android.content.Context; +import com.mindorks.framework.mvp.R; +public class ${className}Activity extends BaseActivity implements ${className}MvpView { + + @Inject + ${className}Presenter<${className}MvpView> mPresenter; + + @Override + protected void onCreate(final Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.${activityLayout}); + + getActivityComponent().inject(this); + setUnBinder(ButterKnife.bind(this)); + mPresenter.onAttach(${className}Activity.this); + } + + public static Intent getStartIntent(Context context) { + Intent intent = new Intent(context, ${className}Activity.class); + return intent; + } + + @Override + protected void onDestroy() { + mPresenter.onDetach(); + super.onDestroy(); + } + + @Override + protected void setUp() { + + } +} \ No newline at end of file diff --git a/template/MVPActivity_AS_v3.6/root/src/app_package/MvpPresenter.java.ftl b/template/MVPActivity_AS_v3.6/root/src/app_package/MvpPresenter.java.ftl new file mode 100644 index 0000000..6c7f716 --- /dev/null +++ b/template/MVPActivity_AS_v3.6/root/src/app_package/MvpPresenter.java.ftl @@ -0,0 +1,7 @@ +package ${packageName}.${folderName}; + +import com.mindorks.framework.mvp.ui.base.MvpPresenter; + +public interface ${className}MvpPresenter extends MvpPresenter { + +} \ No newline at end of file diff --git a/template/MVPActivity_AS_v3.6/root/src/app_package/Presenter.java.ftl b/template/MVPActivity_AS_v3.6/root/src/app_package/Presenter.java.ftl new file mode 100644 index 0000000..d90616e --- /dev/null +++ b/template/MVPActivity_AS_v3.6/root/src/app_package/Presenter.java.ftl @@ -0,0 +1,21 @@ +package ${packageName}.${folderName}; + + +import com.mindorks.framework.mvp.ui.base.BasePresenter; +import com.mindorks.framework.mvp.utils.rx.SchedulerProvider; +import com.mindorks.framework.mvp.data.DataManager; +import io.reactivex.disposables.CompositeDisposable; + +import javax.inject.Inject; + +public class ${className}Presenter extends BasePresenter implements ${className}MvpPresenter { + + private static final String TAG = "${className}Presenter"; + + @Inject + public ${className}Presenter(DataManager dataManager, + SchedulerProvider schedulerProvider, + CompositeDisposable compositeDisposable) { + super(dataManager, schedulerProvider, compositeDisposable); + } +} \ No newline at end of file diff --git a/template/MVPActivity_AS_v3.6/root/src/app_package/View.java.ftl b/template/MVPActivity_AS_v3.6/root/src/app_package/View.java.ftl new file mode 100644 index 0000000..fd4ebf1 --- /dev/null +++ b/template/MVPActivity_AS_v3.6/root/src/app_package/View.java.ftl @@ -0,0 +1,6 @@ +package ${packageName}.${folderName}; + +import com.mindorks.framework.mvp.ui.base.MvpView; + +public interface ${className}MvpView extends MvpView { +} \ No newline at end of file diff --git a/template/MVPActivity_AS_v3.6/template.xml b/template/MVPActivity_AS_v3.6/template.xml new file mode 100644 index 0000000..5b4daca --- /dev/null +++ b/template/MVPActivity_AS_v3.6/template.xml @@ -0,0 +1,67 @@ + + diff --git a/template/MVPActivity_AS_v3.6/template_blank_activity.png b/template/MVPActivity_AS_v3.6/template_blank_activity.png new file mode 100644 index 0000000000000000000000000000000000000000..c682fcf40bb42586663b94887999402a0758ea9b GIT binary patch literal 4594 zcmdT|dsGu=7QYh$L<|OK3y3H~jgM8T!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