| 1 |
<?xml version="1.0"?> |
| 2 |
<template |
| 3 |
format="5" |
| 4 |
revision="6" |
| 5 |
name="Navigation Drawer Activity" |
| 6 |
minApi="7" |
| 7 |
minBuildApi="14" |
| 8 |
requireAppTheme="true" |
| 9 |
description="Creates a new Activity with a Navigation Drawer."> |
| 10 |
|
| 11 |
<category value="Activity" /> |
| 12 |
<formfactor value="Mobile" /> |
| 13 |
|
| 14 |
<parameter |
| 15 |
id="activityClass" |
| 16 |
name="Activity Name" |
| 17 |
type="string" |
| 18 |
constraints="class|unique|nonempty" |
| 19 |
suggest="${layoutToActivity(layoutName)}" |
| 20 |
default="MainActivity" |
| 21 |
help="The name of the activity class to create" /> |
| 22 |
|
| 23 |
<parameter |
| 24 |
id="layoutName" |
| 25 |
name="Layout Name" |
| 26 |
type="string" |
| 27 |
constraints="layout|unique|nonempty" |
| 28 |
suggest="${activityToLayout(activityClass)}" |
| 29 |
default="activity_main" |
| 30 |
help="The name of the layout to create for the activity" /> |
| 31 |
|
| 32 |
<parameter |
| 33 |
id="activityTitle" |
| 34 |
name="Title" |
| 35 |
type="string" |
| 36 |
constraints="nonempty" |
| 37 |
default="MainActivity" |
| 38 |
suggest="${activityClass}" |
| 39 |
help="The name of the activity. For launcher activities, the application title." /> |
| 40 |
|
| 41 |
<parameter |
| 42 |
id="isLauncher" |
| 43 |
name="Launcher Activity" |
| 44 |
type="boolean" |
| 45 |
default="false" |
| 46 |
help="If true, this activity will have a CATEGORY_LAUNCHER intent filter, making it visible in the launcher" /> |
| 47 |
|
| 48 |
<parameter |
| 49 |
id="parentActivityClass" |
| 50 |
name="Hierarchical Parent" |
| 51 |
type="string" |
| 52 |
constraints="activity|exists|empty" |
| 53 |
default="" |
| 54 |
help="The hierarchical parent activity, used to provide a default implementation for the 'Up' button" /> |
| 55 |
|
| 56 |
<parameter |
| 57 |
id="packageName" |
| 58 |
name="Package name" |
| 59 |
type="string" |
| 60 |
constraints="package" |
| 61 |
default="com.mycompany.myapp" /> |
| 62 |
|
| 63 |
<parameter |
| 64 |
id="navigationDrawerLayout" |
| 65 |
name="Navigation Drawer Fragment Name" |
| 66 |
type="string" |
| 67 |
visibility="false" |
| 68 |
suggest="${activityToLayout(activityClass, 'drawer')}" |
| 69 |
constraints="layout|unique" |
| 70 |
default="fragment_navigation_drawer"/> |
| 71 |
|
| 72 |
<parameter |
| 73 |
id="fragmentLayoutName" |
| 74 |
name="Fragment Layout Name" |
| 75 |
type="string" |
| 76 |
visibility="false" |
| 77 |
constraints="layout|unique|nonempty" |
| 78 |
suggest="${activityToLayout(activityClass, 'fragment')}" |
| 79 |
default="fragment_main" |
| 80 |
help="The name of the layout to create for the activity's content fragment"/> |
| 81 |
|
| 82 |
<parameter |
| 83 |
id="appBarLayoutName" |
| 84 |
name="App Bar Layout Name" |
| 85 |
type="string" |
| 86 |
constraints="layout|unique" |
| 87 |
suggest="${activityToLayout(activityClass, 'app_bar')}" |
| 88 |
default="app_bar_main" |
| 89 |
visibility="false" |
| 90 |
help="The name of the App Bar layout to create for the activity" /> |
| 91 |
|
| 92 |
<parameter |
| 93 |
id="navHeaderLayoutName" |
| 94 |
name="Navigation Header Layout Name" |
| 95 |
type="string" |
| 96 |
constraints="layout|unique" |
| 97 |
suggest="${activityToLayout(activityClass, 'nav_header')}" |
| 98 |
default="nav_header_main" |
| 99 |
visibility="false" |
| 100 |
help="The name of the Navigation header layout to create for the activity" /> |
| 101 |
|
| 102 |
<parameter |
| 103 |
id="drawerMenu" |
| 104 |
name="Drawer Menu Name" |
| 105 |
type="string" |
| 106 |
constraints="layout|unique" |
| 107 |
suggest="${layoutName}_drawer" |
| 108 |
default="activity_main_drawer" |
| 109 |
visibility="false" |
| 110 |
help="The name of the Drawer menu to create for the activity" /> |
| 111 |
|
| 112 |
<parameter |
| 113 |
id="contentLayoutName" |
| 114 |
name="Content Layout Name" |
| 115 |
type="string" |
| 116 |
constraints="layout|unique" |
| 117 |
suggest="${activityToLayout(activityClass, 'content')}" |
| 118 |
default="content_main" |
| 119 |
visibility="false" |
| 120 |
help="The name of the content layout to create for the activity" /> |
| 121 |
|
| 122 |
|
| 123 |
<!-- 128x128 thumbnails relative to template.xml --> |
| 124 |
<thumbs> |
| 125 |
<!-- default thumbnail is required --> |
| 126 |
<thumb>template_blank_activity_drawer.png</thumb> |
| 127 |
</thumbs> |
| 128 |
|
| 129 |
<globals file="globals.xml.ftl" /> |
| 130 |
<execute file="recipe.xml.ftl" /> |
| 131 |
|
| 132 |
</template> |