-
Notifications
You must be signed in to change notification settings - Fork 83
/
Copy pathtemplate.xml
135 lines (91 loc) · 7.81 KB
/
template.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<?xml version="1.0"?>
<template format="3" revision="1" name="RecyclerViewTemplate" minApi="7" minBuildApi="14" description="Creates a new Activity or Fragment with custom RecyclerView Adapter.">
<category value="Other"/>
<parameter id="isFragment" name="Need Fragment code instead of Activitiy?" type="boolean" default="false" help="If true, the fragment code will be created instead of Activity"/>
<parameter id="activityClass" name="Activity Name" type="string" constraints="class|unique|nonempty" visibility="!isFragment" suggest="${layoutToActivity(layoutActivityName)}" default="RecyclerViewActivity" help="The name of the activity class to create"/>
<parameter id="layoutActivityName" name="Layout Name" type="string" constraints="layout|unique|nonempty" visibility="!isFragment" suggest="${activityToLayout(activityClass)}" default="activity_recycler_view" help="The name of the layout to create for the activity"/>
<parameter id="className" name="Fragment Class Name" type="string" constraints="class|unique|nonempty" visibility="isFragment" default="RecyclerViewFragment" help="The name of the fragment class to create"/>
<parameter
id="fragmentName"
name="Fragment Layout Name"
type="string"
constraints="layout|nonempty|unique"
default="fragment_recycler_view"
visibility="isFragment"
suggest="fragment_${classToResource(className)}"
help="The name of the layout to create" />
<parameter
id="includeFactory"
name="Include fragment factory methods?"
type="boolean"
default="true"
visibility="isFragment"
help="Generate static fragment factory methods for easy instantiation" />
<parameter
id="includeCallbacks"
name="Include interface callbacks?"
type="boolean"
default="false"
visibility="isFragment"
help="Generate event callbacks for communication with an Activity or other fragments" />
<parameter id="activityTitle" name="Title" type="string" constraints="nonempty" default="RecyclerViewActivity" suggest="${activityClass}" help="The name of the activity. For launcher activities, the application title."/>
<parameter id="isLauncher" name="Launcher Activity" type="boolean" default="false" visibility="!isFragment" help="If true, this activity will have a CATEGORY_LAUNCHER intent filter, making it visible in the launcher"/>
<parameter id="isToolbar" name="Need Toolbar" type="boolean" default="false" visibility="!isFragment" help="If true, this activity will have a Toolbar"/>
<parameter id="isSearch" name="Need Search in Toolbar" type="boolean" default="false" help="If true, this activity will have a Toolbar with Search"/>
<parameter id="isFAB" name="Need FAB with RecyclerView" type="boolean" default="false" visibility="!isFragment" help="If true, the recyclerview will have a fab with scroll collapse and expand behaviour"/>
<parameter id="isCardView" name="Need CardView with RecyclerView" type="boolean" default="false" visibility="!(features=='banner' || features=='googleplay')" help="If true, the recyclerview will have a CardView as a item layout"/>
<parameter id="packageName" name="Package name" type="string" constraints="package" default="com.mycompany.myapp"/>
<parameter id="adapterClass" name="Adapter Name" type="string" constraints="class|unique|nonempty" default="RecyclerViewAdapter" help="The name of the adapter class to create"/>
<parameter id="itemLayoutName" name="Adapter Layout Name" type="string" constraints="layout|nonempty" default="item_recycler_list" help="The name of the row layout to use"/>
<parameter id="adapterGooglePlayClass" name="Adapter Google play Name" type="string" constraints="class|unique|nonempty" default="SingleItemListAdapter" help="The name of the google play adapter class to create" visibility="false"/>
<parameter id="adapterModelClass" name="Model Name" type="string" constraints="class|unique|nonempty" default="AbstractModel" help="The name of the model class for adapter"/>
<parameter id="features" name="RecyclerView Style" type="enum" default="simple" help="Choose your own RecyclerView style">
<option id="simple">Simple RecyclerView</option>
<option id="banner">Banner RecyclerView</option>
<option id="radio">RadioButton Recyclerview</option>
<option id="checkbox">Checkbox Recyclerview</option>
<option id="toggle">Toggle Recyclerview</option>
<option id="googleplay">GooglePlay like Recyclerview</option>
<option id="section">Section Recyclerview</option>
</parameter>
<parameter id="layoutmanager" name="LayoutManager Type" type="enum" default="list" visibility="!(features=='googleplay' || features=='section')" help="Choose your own LayoutManager Type">
<option id="list">List (LinearLayoutManager)</option>
<option id="grid">Grid (GridLayoutManager)</option>
</parameter>
<parameter id="layoutorientation" name="Layout Orientation" type="enum" default="vertical" visibility="!(features=='googleplay' || features =='section' || layoutmanager =='grid')" help="Vertical is default, Choose horizontal if you want Horizonatal Scrollview like RecyclerView">
<option id="vertical">Vertical</option>
<option id="horizontal">Horizontal (HorizontalScrollView style)</option>
</parameter>
<parameter id="isHeader" name="Add Header" type="boolean" default="false" visibility="!(features=='googleplay' || features=='section')" help="If true, recyclerview list item will have a header"/>
<parameter id="isFooter" name="Add Footer" type="boolean" default="false" visibility="!(features=='googleplay' || features=='section')" help="If true, recyclerview list item will have a footer"/>
<parameter id="isItemClick" name="Need ItemClick" type="boolean" default="true" help="If true, recyclerview list item will be clickable"/>
<parameter id="isSwipeRefreshLayout" name="Need SwipeRefreshLayout" type="boolean" default="false" help="If true, swipe refresh layout will be enabled"/>
<parameter id="isDivider" name="Need Divider" type="boolean" default="false" visibility="!(layoutmanager == 'grid' || features=='googleplay' || isCardView)" help="If true, divider layout will be shown"/>
<parameter id="isPagination" name="Need Pagination" type="boolean" default="false" help="If true, pagination will be enabled for RecyclerView"/>
<parameter id="itemClass" name="Item Name" type="string" constraints="class|nonempty" default="ViewHolder" visibility="false" help="The name of the ViewHolder class to create"/>
<parameter id="itemLayoutHeaderName" name="Item Layout Header Name" type="string" constraints="layout|nonempty" default="item_recycler_header" help="The name of the row layout to use" visibility="false"/>
<parameter id="itemLayoutFooterName" name="Item Layout Footer Name" type="string" constraints="layout|nonempty" default="item_recycler_footer" help="The name of the row layout to use" visibility="false"/>
<parameter id="itemLayoutGooglePlay" name="Item Layout Google Play" type="string" constraints="layout|nonempty" visibility="false" default="item_recycler_google_play" help="The name of the Google play row layout to use"/>
<parameter
id="itemLayoutItemGooglePlay"
name="Item Layout for single card Google Play"
type="string"
constraints="layout|nonempty"
visibility="false"
default="item_recycler_item_google_play"
help="The name of the Google play single row layout to use"/>
<!-- <parameter
id="layoutName"
name="Layout Row Name"
type="string"
constraints="layout|nonempty"
default="item_recycler_list"
help="The name of the row layout to use" /> -->
<!-- 128x128 thumbnails relative to template.xml -->
<thumbs>
<!-- default thumbnail is required -->
<thumb>templates_adapter_list.png</thumb>
</thumbs>
<globals file="globals.xml.ftl"/>
<execute file="recipe.xml.ftl"/>
</template>