aboutsummaryrefslogtreecommitdiffstats
path: root/templates/activities/MasterDetailFlow
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2012-06-20 17:40:10 -0700
committerTor Norbye <tnorbye@google.com>2012-06-20 18:16:44 -0700
commit6d1e4fdd6b2132b895aae80de3dba83c3960d43f (patch)
tree3d43bcbde68453413dc5c84393ede4cf1c09a626 /templates/activities/MasterDetailFlow
parent71c8c3f1186fe27b21aaddc90f8278c27733edd9 (diff)
downloadsdk-6d1e4fdd6b2132b895aae80de3dba83c3960d43f.zip
sdk-6d1e4fdd6b2132b895aae80de3dba83c3960d43f.tar.gz
sdk-6d1e4fdd6b2132b895aae80de3dba83c3960d43f.tar.bz2
Miscellaneous wizard fixes
* Add minSdk requirements on templates, and attempting to pick a template with a higher minimum SDK than the one used by the current project will result in a validation error message (and the Next button is disabled). Similarly, add a minSdk requirement on options, such as the BlankActivity's navigation type. This is used to block all navigation types except for "none", unless minSdkVersion >= 14. * Add a buildApi property, which the templates use to only conditionally write contents which requires a higher compilation target. For example, the values-v11 and values-v14 folders specifying Theme.Holo.Light and Theme.Holo.Light.DarkActionBar are only written if the build target is at least 11 and 14 respectively. * Fix some other minor issues which prevented the projects from compiling with low minSdkVersions and low build targets. * Replace the default simple activity's layout (which was just a <TextView> with a center gravity, with a <RelativeLayout> containing the <TextView> with center constraints * Make the code which combines the list of templates from extras/ and tools/ smarter; instead of just concatenating the two lists, it now compares them, and when they have the same names (same templates, different versions), it now chooses which one to use based on the template revision number in the metadata file. Moved some code out of TemplateHandler and into a new TemplateManager class, such that I could add metadata caching (since the code to merge templates in multiple files would repeatedly read and parse the metadata for each pair comparison.) Change-Id: I94fc4f754dd7125b5be5c78e61efcfc268f73af5
Diffstat (limited to 'templates/activities/MasterDetailFlow')
-rw-r--r--templates/activities/MasterDetailFlow/template.xml1
1 files changed, 1 insertions, 0 deletions
diff --git a/templates/activities/MasterDetailFlow/template.xml b/templates/activities/MasterDetailFlow/template.xml
index 05ddb68..70a3995 100644
--- a/templates/activities/MasterDetailFlow/template.xml
+++ b/templates/activities/MasterDetailFlow/template.xml
@@ -3,6 +3,7 @@
format="1"
revision="1"
name="New Master/Detail Flow"
+ minApi="11"
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.">
<dependency name="android-support-v4" revision="8" />