| 1 |
<?xml version="1.0"?> |
| 2 |
<recipe> |
| 3 |
|
| 4 |
<#if appCompat && !(hasDependency('com.android.support:appcompat-v7'))> |
| 5 |
<dependency mavenUrl="com.android.support:appcompat-v7:${buildApi}.+"/> |
| 6 |
</#if> |
| 7 |
|
| 8 |
<#if !appCompat && !(hasDependency('com.android.support:support-v4'))> |
| 9 |
<dependency mavenUrl="com.android.support:support-v4:${buildApi}.+"/> |
| 10 |
</#if> |
| 11 |
|
| 12 |
<#if !appCompat && !(hasDependency('com.android.support:support-v13'))> |
| 13 |
<dependency mavenUrl="com.android.support:support-v13:${buildApi}.+"/> |
| 14 |
</#if> |
| 15 |
|
| 16 |
<#if hasAppBar && !(hasDependency('com.android.support:design'))> |
| 17 |
<dependency mavenUrl="com.android.support:design:${buildApi}.+"/> |
| 18 |
</#if> |
| 19 |
|
| 20 |
<#include "../common/recipe_manifest.xml.ftl" /> |
| 21 |
|
| 22 |
<instantiate from="root/res/menu/main.xml.ftl" |
| 23 |
to="${escapeXmlAttribute(resOut)}/menu/${menuName}.xml" /> |
| 24 |
|
| 25 |
<merge from="root/res/values/strings.xml.ftl" |
| 26 |
to="${escapeXmlAttribute(resOut)}/values/strings.xml" /> |
| 27 |
|
| 28 |
<merge from="root/res/values/dimens.xml.ftl" |
| 29 |
to="${escapeXmlAttribute(resOut)}/values/dimens.xml" /> |
| 30 |
<merge from="root/res/values-w820dp/dimens.xml" |
| 31 |
to="${escapeXmlAttribute(resOut)}/values-w820dp/dimens.xml" /> |
| 32 |
|
| 33 |
<#if hasAppBar> |
| 34 |
<#include "../common/recipe_no_actionbar.xml.ftl" /> |
| 35 |
</#if> |
| 36 |
|
| 37 |
<!-- Decide what kind of layout(s) to add --> |
| 38 |
<#if hasAppBar> |
| 39 |
<instantiate from="root/res/layout/app_bar_activity.xml.ftl" |
| 40 |
to="${escapeXmlAttribute(resOut)}/layout/${layoutName}.xml" /> |
| 41 |
<#elseif hasViewPager> |
| 42 |
<instantiate from="root/res/layout/activity_pager.xml.ftl" |
| 43 |
to="${escapeXmlAttribute(resOut)}/layout/${layoutName}.xml" /> |
| 44 |
<#else> |
| 45 |
<instantiate from="root/res/layout/activity_fragment_container.xml.ftl" |
| 46 |
to="${escapeXmlAttribute(resOut)}/layout/${layoutName}.xml" /> |
| 47 |
</#if> |
| 48 |
|
| 49 |
<instantiate from="root/res/layout/fragment_simple.xml.ftl" |
| 50 |
to="${escapeXmlAttribute(resOut)}/layout/${fragmentLayoutName}.xml" /> |
| 51 |
|
| 52 |
<!-- Decide which activity code to add --> |
| 53 |
<#if hasViewPager || hasAppBar> |
| 54 |
<instantiate from="root/src/app_package/TabsAndPagerActivity.java.ftl" |
| 55 |
to="${escapeXmlAttribute(srcOut)}/${activityClass}.java" /> |
| 56 |
<#else> |
| 57 |
<instantiate from="root/src/app_package/DropdownActivity.java.ftl" |
| 58 |
to="${escapeXmlAttribute(srcOut)}/${activityClass}.java" /> |
| 59 |
</#if> |
| 60 |
|
| 61 |
<open file="${escapeXmlAttribute(srcOut)}/${activityClass}.java" /> |
| 62 |
<open file="${escapeXmlAttribute(resOut)}/layout/${fragmentLayoutName}.xml" /> |
| 63 |
</recipe> |