diff options
| -rw-r--r-- | eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/templates/NewProjectWizard.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/templates/NewProjectWizard.java b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/templates/NewProjectWizard.java index 56bc955..2c8d87b 100644 --- a/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/templates/NewProjectWizard.java +++ b/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/wizards/templates/NewProjectWizard.java @@ -75,6 +75,7 @@ public class NewProjectWizard extends TemplateWizard { static final String CATEGORY_PROJECTS = "projects"; //$NON-NLS-1$ static final String CATEGORY_ACTIVITIES = "activities"; //$NON-NLS-1$ static final String CATEGORY_OTHER = "other"; //$NON-NLS-1$ + static final String ATTR_APP_COMPAT = "appCompat"; //$NON-NLS-1$ /** * Reserved file name for the launcher icon, resolves to the xhdpi version * @@ -268,6 +269,11 @@ public class NewProjectWizard extends TemplateWizard { Map<String, Object> paramMap = new HashMap<String, Object>(); addProjectInfo(paramMap); TemplateHandler.addDirectoryParameters(paramMap, getProject()); + // We don't know at this point whether the activity is going to need + // AppCompat so we just assume that it will. + if (mValues.createActivity) { + paramMap.put(ATTR_APP_COMPAT, true); + } return template.render(mProject, paramMap); } |
