This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* -*- mode: java; c-basic-offset: 2; indent-tabs-mode: nil -*- */ | |
/* | |
Part of the Processing project - http://processing.org | |
Copyright (c) 2012-15 The Processing Foundation | |
Copyright (c) 2004-12 Ben Fry and Casey Reas | |
Copyright (c) 2001-04 Massachusetts Institute of Technology | |
This library is free software; you can redistribute it and/or |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ${packageName}; | |
public class ${className}Presenter extends DemoBasePresenter<${className}Contract.View> implements ${className}Contract.Presenter { | |
@Inject | |
public ${className}Presenter(${className}Contract.View view){ | |
super(view); | |
} | |
@Override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ${packageName}; | |
public interface ${className}Contract{ | |
interface View extends DemoBaseContract.ActivityView { | |
} | |
interface Presenter extends DemoBaseContract.Presenter { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ${packageName}; | |
@Module | |
public abstract class ${className}ActivityModule { | |
@Binds | |
@PerActivity | |
abstract ${className}Contract.Presenter providesPresenter(${className}Presenter presenter); | |
@Binds | |
@PerActivity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ${packageName}; | |
public class ${className}Activity extends DemoBaseActivity<${className}Contract.Presenter> implements ${className}Contract.View { | |
@Override | |
protected void onCreate(final Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_demo); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<globals> | |
<global id="resOut" value="${resDir}" /> | |
<global id="srcOut" value="${srcDir}/${slashedPackageName(packageName)}" /> | |
</globals> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<recipe> | |
<instantiate from="src/app_package/Contract.java.ftl" | |
to="${escapeXmlAttribute(srcOut)}/${className}Contract.java" /> | |
<instantiate from="src/app_package/Activity.java.ftl" | |
to="${escapeXmlAttribute(srcOut)}/${className}Activity.java" /> | |
<instantiate from="src/app_package/Presenter.java.ftl" | |
to="${escapeXmlAttribute(srcOut)}/${className}Presenter.java" /> | |
<instantiate from="src/app_package/ActivityModule.java.ftl" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template format="4" | |
revision="1" | |
name="MVP Template Activity" | |
description="Creates a new MVP classes - Presenter, View, Contract and Dagger Module."> | |
<category value="Other"/> | |
<parameter id="className" | |
name="Functionality Name" | |
type="string" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end | |
import android.content.Context; | |
import android.support.v7.widget.RecyclerView; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import java.util.List; | |
#parse("File Header.java") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
public class EmptyActivity extends AppCompatActivity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main2); | |
} |
NewerOlder