| 1 |
<?xml version="1.0"?> |
| 2 |
<template |
| 3 |
format="5" |
| 4 |
revision="3" |
| 5 |
name="Fragment (List)" |
| 6 |
description="Creates a new empty fragment containing a list that can be rendered as a grid. Compatible back to API level 4." |
| 7 |
minApi="7" |
| 8 |
minBuildApi="8"> |
| 9 |
|
| 10 |
<category value="Fragment" /> |
| 11 |
|
| 12 |
<dependency name="android-support-v4" revision="8" /> |
| 13 |
|
| 14 |
<parameter |
| 15 |
id="packageName" |
| 16 |
name="Package name" |
| 17 |
type="string" |
| 18 |
constraints="package" |
| 19 |
default="com.mycompany.myapp" /> |
| 20 |
|
| 21 |
<parameter |
| 22 |
id="objectKind" |
| 23 |
name="Object Kind" |
| 24 |
type="string" |
| 25 |
constraints="nonempty" |
| 26 |
default="Item" |
| 27 |
help="Other examples are 'Person', 'Book', etc." /> |
| 28 |
|
| 29 |
<parameter |
| 30 |
id="className" |
| 31 |
type="string" |
| 32 |
constraints="nonempty|class|unique" |
| 33 |
suggest="${extractLetters(objectKind)}Fragment" |
| 34 |
name="Fragment class name" /> |
| 35 |
|
| 36 |
<parameter |
| 37 |
id="includeFactory" |
| 38 |
name="Include fragment factory methods?" |
| 39 |
type="boolean" |
| 40 |
default="true" |
| 41 |
help="Generate static fragment factory methods for easy instantiation" /> |
| 42 |
|
| 43 |
<parameter |
| 44 |
id="columnCount" |
| 45 |
name="Column Count" |
| 46 |
type="enum" |
| 47 |
default="1" |
| 48 |
help="The number of columns in the grid" > |
| 49 |
<option id="1">1 (List)</option> |
| 50 |
<option id="2">2 (Grid)</option> |
| 51 |
<option id="3">3</option> |
| 52 |
<option id="4">4</option> |
| 53 |
</parameter> |
| 54 |
|
| 55 |
<parameter |
| 56 |
id="fragment_layout" |
| 57 |
type="string" |
| 58 |
constraints="layout|nonempty|unique" |
| 59 |
suggest="fragment_${extractLetters(objectKind?lower_case)}" |
| 60 |
name="Object content layout file name" /> |
| 61 |
|
| 62 |
<parameter |
| 63 |
id="fragment_layout_list" |
| 64 |
type="string" |
| 65 |
constraints="layout|nonempty|unique" |
| 66 |
suggest="fragment_${extractLetters(objectKind?lower_case)}_list" |
| 67 |
name="List layout file name" /> |
| 68 |
|
| 69 |
<parameter |
| 70 |
id="adapterClassName" |
| 71 |
type="string" |
| 72 |
constraints="nonempty|class|unique" |
| 73 |
suggest="My${extractLetters(objectKind)}RecyclerViewAdapter" |
| 74 |
name="Adapter class name" |
| 75 |
visible="false"/> |
| 76 |
|
| 77 |
<!-- 128x128 thumbnails relative to template.xml --> |
| 78 |
<thumbs> |
| 79 |
<!-- default thumbnail is required --> |
| 80 |
<thumb>templates_list_fragment.png</thumb> |
| 81 |
</thumbs> |
| 82 |
|
| 83 |
|
| 84 |
<globals file="globals.xml.ftl" /> |
| 85 |
<execute file="recipe.xml.ftl" /> |
| 86 |
|
| 87 |
</template> |