diff options
Diffstat (limited to 'templates/activities/BlankActivity/recipe.xml.ftl')
-rw-r--r-- | templates/activities/BlankActivity/recipe.xml.ftl | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/templates/activities/BlankActivity/recipe.xml.ftl b/templates/activities/BlankActivity/recipe.xml.ftl new file mode 100644 index 0000000..2ce72db --- /dev/null +++ b/templates/activities/BlankActivity/recipe.xml.ftl @@ -0,0 +1,56 @@ +<?xml version="1.0"?> +<recipe> + <merge from="AndroidManifest.xml.ftl" /> + + <copy from="res/drawable-hdpi" /> + <copy from="res/drawable-mdpi" /> + <copy from="res/drawable-xhdpi" /> + + <copy from="res/menu/main.xml" + to="res/menu/${menuName}.xml" /> + + <merge from="res/values/dimens.xml" /> + <merge from="res/values-large/dimens.xml" /> + <merge from="res/values/strings.xml.ftl" /> + + <!-- Decide whether or not to add the support library --> + <#if navType != "none"> + <copy from="${android.templatesRes}/android-support-v4.jar.bin" + to="libs/android-support-v4.jar" /> + </#if> + + <!-- Decide what kind of layout to add (viewpager or not) --> + <#if navType?contains("pager")> + <instantiate from="res/layout/activity_pager.xml.ftl" + to="res/layout/${layoutName}.xml" /> + + <#elseif navType == "tabs" || navType == "dropdown"> + <instantiate from="res/layout/activity_fragment_container.xml" + to="res/layout/${layoutName}.xml" /> + + <#else> + <instantiate from="res/layout/activity_simple.xml" + to="res/layout/${layoutName}.xml" /> + </#if> + + <!-- Decide which activity code to add --> + <#if navType == "none"> + <instantiate from="src/app_package/SimpleActivity.java.ftl" + to="${srcOut}/${activityClass}.java" /> + + <#elseif navType == "tabs_pager" || navType == "pager_strip"> + <instantiate from="src/app_package/TabsAndPagerActivity.java.ftl" + to="${srcOut}/${activityClass}.java" /> + + <#elseif navType == "tabs"> + <instantiate from="src/app_package/TabsActivity.java.ftl" + to="${srcOut}/${activityClass}.java" /> + + <#elseif navType == "dropdown"> + <instantiate from="src/app_package/DropdownActivity.java.ftl" + to="${srcOut}/${activityClass}.java" /> + + </#if> + + <open file="res/layout/${layoutName}.xml" /> +</recipe> |