diff options
author | Roman Nurik <romannurik@google.com> | 2012-12-19 10:46:55 -0800 |
---|---|---|
committer | Roman Nurik <romannurik@google.com> | 2012-12-20 09:02:15 -0800 |
commit | d6f8dd0e3202af39a0fc80ed79a934027516ef8b (patch) | |
tree | 267cc056333935cb05128a4d15aca92c1a7aa359 /templates/other/Notification/recipe.xml.ftl | |
parent | 17e7b9b0c77fe08193e31d7880eee1114ba21d44 (diff) | |
download | sdk-d6f8dd0e3202af39a0fc80ed79a934027516ef8b.zip sdk-d6f8dd0e3202af39a0fc80ed79a934027516ef8b.tar.gz sdk-d6f8dd0e3202af39a0fc80ed79a934027516ef8b.tar.bz2 |
New "Notification" ADT template.
This change adds a new Notification template in the 'other' category, that
creates a helper class to show and hide a notification with optional
expanded styles for Android 4.1+ devices. The template also includes
example resources relevant to notifications and leads the user through the
notification icon wizard.
Change-Id: I9765021ea66844f6f8887e1f1f27d6d262ee89a1
Diffstat (limited to 'templates/other/Notification/recipe.xml.ftl')
-rw-r--r-- | templates/other/Notification/recipe.xml.ftl | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/templates/other/Notification/recipe.xml.ftl b/templates/other/Notification/recipe.xml.ftl new file mode 100644 index 0000000..bd1c265 --- /dev/null +++ b/templates/other/Notification/recipe.xml.ftl @@ -0,0 +1,25 @@ +<?xml version="1.0"?> +<recipe> + + <merge from="AndroidManifest.xml.ftl" /> + + <#if expandedStyle == "picture"> + <copy from="res/drawable-nodpi/example_picture_large.png" + to="res/drawable-nodpi/example_picture.png" /> + <#else> + <copy from="res/drawable-nodpi/example_picture_small.png" + to="res/drawable-nodpi/example_picture.png" /> + </#if> + + <#if moreActions> + <copy from="res/drawable-hdpi" /> + <copy from="res/drawable-mdpi" /> + <copy from="res/drawable-xhdpi" /> + </#if> + + <merge from="res/values/strings.xml.ftl" /> + + <instantiate from="src/app_package/NotificationHelper.java.ftl" + to="${srcOut}/${className}.java" /> + <open file="${srcOut}/${className}.java" /> +</recipe> |