| 1 |
<?xml version="1.0"?> |
| 2 |
<template |
| 3 |
format="5" |
| 4 |
revision="6" |
| 5 |
name="Android TV Activity" |
| 6 |
minApi="21" |
| 7 |
minBuildApi="21" |
| 8 |
description="Creates a new Android TV activity using Leanback Support library."> |
| 9 |
|
| 10 |
<category value="Activity" /> |
| 11 |
<formfactor value="TV" /> |
| 12 |
|
| 13 |
<parameter |
| 14 |
id="activityClass" |
| 15 |
name="Activity Name" |
| 16 |
type="string" |
| 17 |
constraints="class|unique|nonempty" |
| 18 |
suggest="${layoutToActivity(layoutName)}" |
| 19 |
default="MainActivity" |
| 20 |
help="The name of the activity class to create" /> |
| 21 |
|
| 22 |
<parameter |
| 23 |
id="layoutName" |
| 24 |
name="Main Layout Name" |
| 25 |
type="string" |
| 26 |
constraints="layout|unique|nonempty" |
| 27 |
suggest="${activityToLayout(activityClass)}" |
| 28 |
default="main" |
| 29 |
help="The name of the layout to create for the activity" /> |
| 30 |
|
| 31 |
<parameter |
| 32 |
id="mainFragment" |
| 33 |
name="Main Fragment" |
| 34 |
type="string" |
| 35 |
constraints="class|unique|nonempty" |
| 36 |
default="MainFragment" |
| 37 |
suggest="MainFragment" |
| 38 |
help="The name of the main fragment." /> |
| 39 |
|
| 40 |
<parameter |
| 41 |
id="activityTitle" |
| 42 |
name="Title" |
| 43 |
type="string" |
| 44 |
constraints="nonempty" |
| 45 |
default="Title" |
| 46 |
suggest="${activityClass} Title" |
| 47 |
help="The name of the activity. For launcher activities, the application title." /> |
| 48 |
|
| 49 |
<parameter |
| 50 |
id="detailsActivity" |
| 51 |
name="Details Activity" |
| 52 |
type="string" |
| 53 |
constraints="class|unique|nonempty" |
| 54 |
default="DetailsActivity" |
| 55 |
suggest="DetailsActivity" |
| 56 |
help="The name of the details activity." /> |
| 57 |
|
| 58 |
<parameter |
| 59 |
id="detailsLayoutName" |
| 60 |
name="Details Layout Name" |
| 61 |
type="string" |
| 62 |
constraints="layout|unique|nonempty" |
| 63 |
suggest="${activityToLayout(detailsActivity)}" |
| 64 |
default="details" |
| 65 |
help="The name of the layout to create for the activity" /> |
| 66 |
|
| 67 |
<parameter |
| 68 |
id="detailsFragment" |
| 69 |
name="Details Fragment" |
| 70 |
type="string" |
| 71 |
constraints="class|unique|nonempty" |
| 72 |
default="VideoDetailsFragment" |
| 73 |
suggest="VideoDetailsFragment" |
| 74 |
help="The name of the details fragment." /> |
| 75 |
|
| 76 |
<parameter |
| 77 |
id="isLauncher" |
| 78 |
name="Launcher Activity" |
| 79 |
type="boolean" |
| 80 |
default="false" |
| 81 |
help="If true, this activity will have a CATEGORY_LAUNCHER intent filter, making it visible in the launcher" /> |
| 82 |
|
| 83 |
<parameter |
| 84 |
id="parentActivityClass" |
| 85 |
name="Hierarchical Parent" |
| 86 |
type="string" |
| 87 |
constraints="activity|exists|empty" |
| 88 |
default="" |
| 89 |
help="The hierarchical parent activity, used to provide a default implementation for the 'Up' button" /> |
| 90 |
|
| 91 |
<parameter |
| 92 |
id="packageName" |
| 93 |
name="Package name" |
| 94 |
type="string" |
| 95 |
constraints="package" |
| 96 |
default="com.mycompany.myapp" /> |
| 97 |
|
| 98 |
<!-- 128x128 thumbnails relative to template.xml --> |
| 99 |
<thumbs> |
| 100 |
<!-- default thumbnail is required --> |
| 101 |
<thumb>template-leanback-TV.png</thumb> |
| 102 |
</thumbs> |
| 103 |
|
| 104 |
<globals file="globals.xml.ftl" /> |
| 105 |
<execute file="recipe.xml.ftl" /> |
| 106 |
|
| 107 |
</template> |