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 0000000..c682fcf Binary files /dev/null and b/template/MVPActivity_AS_v3.6/template_blank_activity.png differ