Skip to content

Instantly share code, notes, and snippets.

@IkhwanSI13
Created May 10, 2020 08:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IkhwanSI13/140e0d7bde834333ffa4034e7613bbda to your computer and use it in GitHub Desktop.
Save IkhwanSI13/140e0d7bde834333ffa4034e7613bbda to your computer and use it in GitHub Desktop.
template.xml for MVP Activity
<?xml version="1.0"?>
<template
format="5"
revision="1"
name="MVP Activity"
description="Creates a new activity with MVP Pattern">
<category value="Activity" />
<formfactor value="Mobile" />
<parameter
id="mvpClass"
name="MVP Name"
type="string"
constraints="class|unique|nonempty"
default="mvp"
help="The name of the MVP class to create" />
<parameter
id="layoutName"
name="Layout Name"
type="string"
constraints="layout|unique|nonempty"
suggest="${activityToLayout(mvpClass)}"
default="activity_main"
help="The name of the layout to create for the activity" />
<parameter
id="isLauncher"
name="Launcher Activity"
type="boolean"
default="false"
help="If true, this activity will have a CATEGORY_LAUNCHER intent filter, making it visible in the launcher" />
<parameter
id="packageName"
name="Package name"
type="string"
constraints="package"
default="com.mycompany.myapp" />
<!-- 128x128 thumbnails relative to template.xml -->
<thumbs>
<!-- default thumbnail is required -->
<thumb>template_blank_activity.png</thumb>
</thumbs>
<globals file="globals.xml.ftl" />
<execute file="recipe.xml.ftl" />
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment