aboutsummaryrefslogtreecommitdiffstats
path: root/templates
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Update to new notice support." into idea133Xavier Ducrohet2014-05-201-0/+190
|\ | | | | | | | | | | | | Auto-merge: b22dbfb * commit 'b22dbfb00380ef5b4dfd5b9ca72c4b408878ae87': Update to new notice support.
| * Update to new notice support.Xavier Ducrohet2014-05-201-0/+190
| | | | | | | | | | | | | | Update the build.gradle file to specify notice files, add missing notice files. Change-Id: Ib5e56bb1c53de3584f3942643bbdf736a872dc06
* | Document template parameter visibility and applicationPackage.Roman Nurik2014-02-251-1/+17
| | | | | | | | | | | | | | | | Add template docs for <parameter visibility> and the applicationPackage variable. Also add visibility to the example code and add a missing Optional marker. Change-Id: I17f70ef110b402dba317863cd2692d30ddb17981
* | Add documentation of module constraintJosiah Gaskin2014-02-031-0/+1
| | | | | | | | | | | | | | This change adds documentation for the module constraint added in https://android-review.googlesource.com/#/c/80795/ Change-Id: I68d773b074945d4db00a886fdc04ad658624b112
* | Update app template documentation.Roman Nurik2014-02-033-66/+231
|/ | | | | | | | | Add support for template format 4, as well as some missing built-in functions and begin documenting built-in parameters. Also improve left nav for the template docs. Finally, update the examples to better align with recent changes to the templates. Change-Id: Ib2b64f55b589750feb82c78ac8c46c88c458eaf5
* Update template location for SDK buildJosiah Gaskin2013-07-31272-6432/+0
| | | | | | | | This change removes templates from the SDK source tree (from sdk/templates) and points the build/tools.atree build location file to their new location in tools/base/templates Change-Id: Id37b24eceaae6dcc0b3bf5078a759a337cb13467
* Increments revisions on templates used by Android StudioScott Barta2013-07-098-8/+8
| | | | | | | | When we bundle templates with Android Studio 0.2.0, this will let it pick up copies from the bundled folder instead of the older versions with the SDK. Change-Id: I503d062dd4dc2ccfadac4af5901f8a779fe8e7ec
* Fixes to Gradle plugin, support library versionsScott Barta2013-07-026-6/+26
| | | | | | | | | | Small fixes to pass the Gradle Android plugin as a dependency. Changes the v4 support library depencency to pull in a Maven artifact instead of a library jar reference. Adds a small fix to ensure the Java package parameter in new projects is nonempty. Change-Id: Icb3e3a704166c8d03a7996872be6a5082d37e1bb
* Escaping for pathnames in template XML filesScott Barta2013-07-018-80/+80
| | | | | | | | Does proper XML escaping in Freemarker XML templates to avoid problems with pathnames that contain XML-sensitive characters. Change-Id: I1f191ccabd0c81af821c7bbdf88bbb23ba42ff9c
* Add template for build.gradleJeff Smith2013-06-131-0/+21
| | | | | | | | Provides the template needed by 'android create project' to create the file build.gradle. Change-Id: I689a76573afd2c4d0454deca3ed694f1fb46065e Signed-off-by: Jeff Smith <whydoubt@gmail.com>
* Fixes reference to AndroidManifest.xml.ftl in the templateScott Barta2013-05-301-1/+1
| | | | Change-Id: I5adf92af254c2a85d58e27723a511fd4e02da7c3
* Use "mavenCentral()" in build.gradle instead of URLSiva Velusamy2013-05-134-2/+10
| | | | Change-Id: Ibb3391a7b1de26baa2492280f542520b2202569e
* Fixes to Java library template so it will render correctlyScott Barta2013-05-134-6/+20
| | | | | | | | Adds package name and class name to the Java library template so it can render correctly using the same input parameters as the other templates. Change-Id: I706e70e8741464bb0c5d2725e7f6114e6e1cb686
* Update Gradle templates for Gradle 1.6 and plugin 0.4Xavier Ducrohet2013-05-103-3/+3
| | | | Change-Id: I259f57f074e18be334fc8d9cdb19724e19dcc9df
* Merge "New "IntentService" ADT template."Roman Nurik2013-05-085-0/+155
|\
| * New "IntentService" ADT template.Adam Koch2013-01-245-0/+155
| | | | | | | | | | | | | | | | This change adds a new IntentService template in the 'other' category, that creates a basic IntentService class, some default actions and optionally some static helper methods to start the service. Change-Id: I86d656507706c71c914a5ec3f13668b47d6358e0
* | Allows build tools version to be passed in.Scott Barta2013-05-064-4/+6
| | | | | | | | Change-Id: I64c12c7f2a0887b080752469e6d34320425ad1e1
* | Merge "Fixes Maven URLs in build.gradle files in templates"Scott Barta2013-05-032-4/+2
|\ \
| * | Fixes Maven URLs in build.gradle files in templatesScott Barta2013-05-032-4/+2
| | | | | | | | | | | | Change-Id: I84bd0213a9dcd6cd13ab94c30a18437a8f84d53a
* | | Update wrapper to 1.6 rc1Xavier Ducrohet2013-05-021-1/+1
| | | | | | | | | | | | Change-Id: I92e8626171737c786a705f57ae8ca18a0e2937c1
* | | Merge "Fullscreen Activity Template nav hiding fix for Honeycomb"Xavier Ducrohet2013-04-301-1/+1
|\ \ \ | |/ / |/| |
| * | Fullscreen Activity Template nav hiding fix for HoneycombBrad Parks2013-04-161-1/+1
| | | | | | | | | | | | | | | | | | | | | Fixes the Full Screen Activity template to properly hide controls and navigation on Honeycomb Change-Id: I85b69c2fc084805fb371df97aedfce94a5145e97
* | | Modified templates for Gradle projectsScott Barta2013-04-2640-50/+649
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modifies the existing templates to output Gradle build files with a new multi-level directory structure. The templates continue to work the old way that Eclipse expects, and the new behavior is only enabled if the "isGradle" global is set to "true". Files to configure the Gradle wrapper are placed in the SDK at tools/templates/gradle/wrapper. This CL changes all file copies and merges to go to fully-qualified directories set up via global variables. Things go to the old locations for non-Gradle builds based on how the globals are set up, but Gradle builds can override output directory variables to reflect the new directory structure. This CL also adds NewAndroidLibrary and NewJavaLibrary project templates, which will be used in the future. The current NewAndroidApplication template also can output a library, which is redundant and confusing; this will likely be fixed somehow in the future. Change-Id: Ieb830bdfba1797d87a218326ebd37c99d254758e
* | New "Daydream" ADT template.Chris Banes2013-03-2610-0/+319
| | | | | | | | | | | | | | | | | | | | This change adds a new Daydream template in the 'other' category, that creates an example DreamService class. The template gives the option of generating a Settings Activity, and options specific to DreamService. Change-Id: Ic50b175610bf67cb482a48e25fed0455dd7c7901 Signed-off-by: Chris Banes <chrisbanes@google.com>
* | New 'AppWidget' ADT Template.Rich Hyndman2013-02-1877-0/+477
| | | | | | | | | | | | | | | | | | | | This change adds an AppWidget template into the 'other' category that creates helper classes and xml for an AppWidget. The template supports setting minimum size, resizable, configuration and home-screen/keyguard options. Signed-off-by: Rich Hyndman <rhyndman@google.com> Change-Id: Ic349b0adf10f8814af6d04b62654592cbeb89c09
* | Merge "ADT templates: BlankActivity and LoginActivity cleanup."Roman Nurik2013-01-2216-22/+76
|\ \
| * | ADT templates: BlankActivity and LoginActivity cleanup.Roman Nurik2013-01-2216-22/+76
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | - BlankActivity: fix a bug where 'none' navtype + minApi < 11 didn't check for API 11 before using ActionBar APIs - BlankActivity: add horizontal and vertical padding, customized for sw720dp-land - BlankActivity: remove navtype that allowed tabs without swipe - change naming convention R.menu.activity_foo to R.menu.foo - change naming convention R.id.menu_foo to R.id.action_foo - add simple XXHDPI icon (scaled up from XHDPI... to be replaced in a future update) Change-Id: Ic5bf3dcfb13e714df505dcbf7c1227b610f0a36e
* | Merge "New "Blank Fragment" ADT template."Roman Nurik2013-01-227-0/+220
|\ \
| * | New "Blank Fragment" ADT template.Adam Koch2013-01-227-0/+220
| |/ | | | | | | | | | | | | | | | | This change adds a new Blank Fragment template in the 'other' category, that creates an empty Fragment class with the option of generating some commonly used boilerplate code such as fragment factory methods, interface callbacks and an empty layout xml. Change-Id: I4c68b9ddb6f7915ca8e75b2c6372664d39e216f5
* | New "List Fragment" ADT template.Chris Banes2013-01-2212-0/+422
|/ | | | | | | | | | | This change adds a new List Fragment template in the 'other' category, that creates an empty Fragment class with interface callbacks. The template gives the option of generating some commonly used boilerplate code such as fragment factory methods, and whether to switch to a GridView on large screens. Change-Id: I1873350e321f25ccbc9cd1e8470387629411d1fe Signed-off-by: Chris Banes <chrisbanes@google.com>
* Merge "New "Notification" ADT template."Roman Nurik2012-12-2022-0/+315
|\
| * New "Notification" ADT template.Roman Nurik2012-12-2022-0/+315
| | | | | | | | | | | | | | | | | | | | 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
* | 41681: "class|unique|nonempty" contraint doesn't check uniquenessTor Norbye2012-12-205-5/+5
|/ | | | | | Also added unique constraint on some of the activity templates. Change-Id: I2af181d9d2d716505c80bb4f487920166594625f
* Fix SettingActivity ADT template.John Spurlock2012-12-142-1/+4
| | | | | | | | pref_headers.xml now goes through variable substitution. Prior to this fix, the generated activity crashes on tablets. Change-Id: Iddff16c5f58ae2414620800fb4f1c34e0e4bb9f5
* Update application template display names and descriptions.Roman Nurik2012-12-1310-20/+20
| | | | Change-Id: Id785c8527eb1602b2b6f29e09fb13f628abaf652
* 41154: Handle allowBackup properly for target < 4Tor Norbye2012-12-101-2/+2
| | | | | | | | This fixes 41154: Template Android Application Project for API v3 reports AAPT problem with android:allowBackup="true" Change-Id: I74b4cd0f8df9a74fe9221250cc83b1d15821ce51
* Make templates handle custom namespaces properlyTor Norbye2012-12-041-1/+5
| | | | Change-Id: Id3685aa63a1e3017b345ec28bbb454656547258c
* Make inefficient weight detector identify more candidatesTor Norbye2012-11-292-0/+2
| | | | | | | | | | | | | | | | | The inefficient weight detector looks for horizontal layouts with weights where all the children are layouts. It didn't have a very good heuristic for finding out whether all children are layouts; it just looked for whether the tag name contains "Layout". This changeset generalizes this a bit, adding other layouts, as well as <fragment> tags to the lint check. It also updates the Master/Detail template to set the baseline alignment attribute to false (to avoid triggering the updated lint check), as well as android:textIsSelectable to clear another recent new lint rule. Change-Id: I887962b5e29a9ad0c5b5c01970b0c66f884125d8
* Template unit testsTor Norbye2012-10-292-5/+8
| | | | | | | | | | | | | | | | | | | | | | This adds a plugin test which runs through project creation for all project+activity combinations, across a series of minSdkVersion, targetSdkVersion and build targets, and also varies all the enum and boolean properties (such as the theme setting, the navigation type, etc). For each created project, it runs both ant (to verify that there are no build errors), as well as lint, to verify that there are no lint warnings, except a few allowed ones (such as the is-using-latest-targetSdkVersion, since we are deliberately testing older targetSdkVersions, and the icon checks (disabled because something about the image loading from unit tests hangs Eclipse). It also tests creating all non-activity templates into an existing project. Also fixes a few template issues found by the unit test. Change-Id: Ibe61c47053a7c3ad17e7e1bbb31f9ae3b49c143a
* Lint fixes for FullscreenActivity and NewAndroidApplication templates.Roman Nurik2012-10-254-6/+6
| | | | | | | - Remove extraneous string in FullscreenActivity - Add allowBackup=true to NewAndroidApplication Change-Id: I12706cff2ab7b73f04634f47fea4eb14b0ed4e2a
* Merge "38920: Fix dropdown navigation template"Tor Norbye2012-10-251-4/+4
|\
| * 38920: Fix dropdown navigation templateTor Norbye2012-10-251-4/+4
| | | | | | | | Change-Id: I24760a17de7ec5278a922c109e8ab1fbe7123bfd
* | Remove extraneous '=' from template.Siva Velusamy2012-10-251-1/+1
|/ | | | Change-Id: I5008ceca85a13b6b9a0c92e0ca5089249b033e1a
* Ensure ADT app templates' activity onCreate is protected.Roman Nurik2012-10-017-8/+9
| | | | | | | | It's considered a best practice for activity onCreate overrides to maintain the original visibility of the method, which is protected. Implement this for all activity templates. Change-Id: Ia501628a3f330f671398935103fafc1834f8e78e
* 37497: Templates should escape string literals in resource filesTor Norbye2012-09-1811-14/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | If the user enters an activity title like "Android's Tools" in the new template wizard, an invalid strings.xml file is generated, since the apostrophe is not properly escaped. To fix this, there's a new string conversion method in the template engine, "escapeXmlString", which will perform all the necessary conversions. It also adds two other XML escaping functions: one to escape text to be suitable for XML attribute values, and one to be suitable for XML text values. Finally, when verifying this, I discovered that if I inserted ampersands in the MasterDetail template, I ended up with errors in various places there a filename was derived from the input string. To help make this work better, there's also a new "extractLetters" method which pulls all the characters out of a string (effectively stripping whitespace and punctuation). In addition to the above 4 new string conversion methods, the templates have been updated to use them, and the template format documentation updated. Change-Id: I4d4e854ab78d63bc86b8eb0fb9d92246534615e7
* Update ADT template format docs to include additional built-in functions.Roman Nurik2012-09-121-2/+48
| | | | | | | | | Specifically, add docs for: - camelCaseToUnderscore - classToResource (new) - underscoreToCamelCase Change-Id: I2d13ea69828f8002cd236054d32888cc7361260e
* Add HTML documentation for ADT templates.Roman Nurik2012-08-307-0/+936
| | | | Change-Id: I7e565ebec48a489f880f556c5f990ff0d0380334
* Don't create a new title string for first activity in prjTor Norbye2012-08-2315-13/+43
| | | | | | | | | | | | | | When an activity is created as part of the New Project wizard, don't ask the user for an activity title; instead, use the project's name (@string/app_name). Since I had to rev the format (to pass the is-new-project context I also cleaned up the compatibility to-string handling of booleans that should no longer be necessary.) This fixes issue 36624: App name issue Change-Id: I6b88b850e0147307db8a9e1585d670e31c261b4c
* Merge "Minor app template bug fixes for LoginActivity and FullscreenActivity"Roman Nurik2012-08-217-9/+34
|\
| * Minor app template bug fixes for LoginActivity and FullscreenActivityRoman Nurik2012-08-107-9/+34
| | | | | | | | | | | | | | | | | | - Fix maxLines=2 for input fields in LoginActivity - Use proper, backward-compatible button bar styles in FullScreenActivity. Change-Id: I20ce76ff5abd8be949644050ad99e2043abf1e5b Bug: 6948808