diff options
author | Tor Norbye <tnorbye@google.com> | 2012-06-14 08:17:48 -0700 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2012-06-14 14:34:52 -0700 |
commit | 7f10682cf646bcb3e761fbb6bcb2f645bd748c03 (patch) | |
tree | 0c5fdd76964421f5b64a73826ff5814fe172fd12 /templates/activities | |
parent | 5978cd057931af1e98ecc51d4bc29b79dc147da2 (diff) | |
download | sdk-7f10682cf646bcb3e761fbb6bcb2f645bd748c03.zip sdk-7f10682cf646bcb3e761fbb6bcb2f645bd748c03.tar.gz sdk-7f10682cf646bcb3e761fbb6bcb2f645bd748c03.tar.bz2 |
Add format handling to the template wizards
This changeset adds a format attribute to the templates. When the ADT
plugin reads a template file, and the format version is a higher
number than one it knows about, it rejects the templates and informs
the user to upgrade the plugin. This allows us to change the format of
the templates incompatibly in the future without worrying about users
with older versions of the plugin running into problems (because they
upgraded the tools but not ADT).
It also adds a revision number to each template which is used for the
opposite purpose: we can tell if a template is a slightly older
revision and then do some conditional handling.
Change-Id: If6c49012a1beca44c3a05b3e880ffde70294a57e
Diffstat (limited to 'templates/activities')
-rw-r--r-- | templates/activities/BlankActivity/template.xml | 2 | ||||
-rw-r--r-- | templates/activities/MasterDetailFlow/template.xml | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/templates/activities/BlankActivity/template.xml b/templates/activities/BlankActivity/template.xml index f7fa903..997051e 100644 --- a/templates/activities/BlankActivity/template.xml +++ b/templates/activities/BlankActivity/template.xml @@ -1,5 +1,7 @@ <?xml version="1.0"?> <template + format="1" + revision="1" name="New Blank Activity" description="Creates a new blank activity, with optional inner navigation."> diff --git a/templates/activities/MasterDetailFlow/template.xml b/templates/activities/MasterDetailFlow/template.xml index d67fb65..4f759cf 100644 --- a/templates/activities/MasterDetailFlow/template.xml +++ b/templates/activities/MasterDetailFlow/template.xml @@ -1,5 +1,7 @@ <?xml version="1.0"?> <template + format="1" + revision="1" name="New Master/Detail Flow" description="Creates a new master/detail flow, which is two columns on tablets, and one column on smaller screens. This creates a master fragment, detail fragment, and two activities."> @@ -51,4 +53,4 @@ <globals file="globals.xml.ftl" /> <execute file="recipe.xml.ftl" /> -</template>
\ No newline at end of file +</template> |