75 |
75 |
|
76 |
76 |
public class TableOfContents extends ListActivity
|
77 |
77 |
{
|
78 |
|
private static final String ITEM_IMAGE = "item_image";
|
79 |
|
private static final String ITEM_TITLE = "item_title";
|
|
78 |
private static final String ITEM_IMAGE = "item_image";
|
|
79 |
private static final String ITEM_TITLE = "item_title";
|
80 |
80 |
private static final String ITEM_SUBTITLE = "item_subtitle";
|
81 |
81 |
|
|
82 |
private enum Application
|
|
83 |
{
|
|
84 |
MONALISA (R.drawable.icon_example_monalisa , R.string.example_monalisa , R.string.example_monalisa_subtitle , MonaLisaActivity.class),
|
|
85 |
SINK (R.drawable.icon_example_sink , R.string.example_sink , R.string.example_sink_subtitle , SinkActivity.class),
|
|
86 |
BEAN (R.drawable.icon_example_bean , R.string.example_bean , R.string.example_bean_subtitle , BeanActivity.class),
|
|
87 |
PROJECTION (R.drawable.icon_example_projection , R.string.example_projection , R.string.example_projection_subtitle , ProjectionActivity.class),
|
|
88 |
DEFORM (R.drawable.icon_example_deform , R.string.example_deform , R.string.example_deform_subtitle , DeformActivity.class),
|
|
89 |
LISTENER (R.drawable.icon_example_listener , R.string.example_listener , R.string.example_listener_subtitle , ListenerActivity.class),
|
|
90 |
DYNAMIC (R.drawable.icon_example_dynamic , R.string.example_dynamic , R.string.example_dynamic_subtitle , DynamicActivity.class),
|
|
91 |
GIRL (R.drawable.icon_example_girl , R.string.example_girl , R.string.example_girl_subtitle , GirlActivity.class),
|
|
92 |
CATANDDOG (R.drawable.icon_example_catanddog , R.string.example_catanddog , R.string.example_catanddog_subtitle , CatAndDogActivity.class),
|
|
93 |
MOVINGEFFECTS (R.drawable.icon_example_movingeffects , R.string.example_movingeffects , R.string.example_movingeffects_subtitle , MovingEffectsActivity.class),
|
|
94 |
DIFFERENTEFFECTS (R.drawable.icon_example_differenteffects, R.string.example_differenteffects, R.string.example_differenteffects_subtitle, DifferentEffectsActivity.class),
|
|
95 |
DIFFERENTBITMAPS (R.drawable.icon_example_differentbitmaps, R.string.example_differentbitmaps, R.string.example_differentbitmaps_subtitle, DifferentBitmapsActivity.class),
|
|
96 |
EFFECTQUEUE (R.drawable.icon_example_effectqueue , R.string.example_effectqueue , R.string.example_effectqueue_subtitle , EffectQueueActivity.class),
|
|
97 |
CHECK (R.drawable.icon_example_check , R.string.example_check , R.string.example_check_subtitle , CheckActivity.class),
|
|
98 |
OBJECTTREE (R.drawable.icon_example_objecttree , R.string.example_objecttree , R.string.example_objecttree_subtitle , ObjectTreeActivity.class),
|
|
99 |
STARWARS (R.drawable.icon_example_starwars , R.string.example_starwars , R.string.example_starwars_subtitle , StarWarsActivity.class),
|
|
100 |
OLIMPIC (R.drawable.icon_example_olimpic , R.string.example_olimpic , R.string.example_olimpic_subtitle , OlimpicActivity.class),
|
|
101 |
QUATERNION (R.drawable.icon_example_quaternion , R.string.example_quaternion , R.string.example_quaternion_subtitle , QuaternionActivity.class),
|
|
102 |
INFLATE (R.drawable.icon_example_inflate , R.string.example_inflate , R.string.example_inflate_subtitle , InflateActivity.class),
|
|
103 |
GENERIC (R.drawable.icon_example_generic , R.string.example_generic , R.string.example_generic_subtitle , GenericActivity.class),
|
|
104 |
PLAINMONALISA (R.drawable.icon_example_monalisa , R.string.example_plainmonalisa , R.string.example_plainmonalisa_subtitle , PlainMonaLisaActivity.class),
|
|
105 |
SAVE (R.drawable.icon_example_save , R.string.example_save , R.string.example_save_subtitle , SaveActivity.class),
|
|
106 |
FLAG (R.drawable.icon_example_flag , R.string.example_flag , R.string.example_flag_subtitle , FlagActivity.class),
|
|
107 |
WIND (R.drawable.icon_example_wind , R.string.example_wind , R.string.example_wind_subtitle , WindActivity.class),
|
|
108 |
AROUNDTHEWORLD (R.drawable.icon_example_aroundtheworld , R.string.example_aroundtheworld , R.string.example_aroundtheworld_subtitle , AroundTheWorldActivity.class),
|
|
109 |
MIRROR (R.drawable.icon_example_mirror , R.string.example_mirror , R.string.example_mirror_subtitle , MirrorActivity.class),
|
|
110 |
STENCIL (R.drawable.icon_example_stencil , R.string.example_stencil , R.string.example_stencil_subtitle , StencilActivity.class),
|
|
111 |
BLUR (R.drawable.icon_example_blur , R.string.example_blur , R.string.example_blur_subtitle , BlurActivity.class),
|
|
112 |
MULTIBLUR (R.drawable.icon_example_multiblur , R.string.example_multiblur , R.string.example_multiblur_subtitle , MultiblurActivity.class),
|
|
113 |
TRIBLUR (R.drawable.icon_example_triblur , R.string.example_triblur , R.string.example_triblur_subtitle , TriblurActivity.class),
|
|
114 |
TRANSPARENCY (R.drawable.icon_example_transparency , R.string.example_transparency , R.string.example_transparency_subtitle , TransparencyActivity.class),
|
|
115 |
POSTPROCESSTREE (R.drawable.icon_example_postprocesstree , R.string.example_postprocesstree , R.string.example_postprocesstree_subtitle , PostprocessTreeActivity.class),
|
|
116 |
GLOW (R.drawable.icon_example_glow , R.string.example_glow , R.string.example_glow_subtitle , GlowActivity.class),
|
|
117 |
MOVINGGLOW (R.drawable.icon_example_movingglow , R.string.example_moving_glow , R.string.example_moving_glow_subtitle , MovingGlowActivity.class),
|
|
118 |
EARTH (R.drawable.icon_example_earth , R.string.example_earth , R.string.example_earth_subtitle , EarthActivity.class),
|
|
119 |
RUBIK (R.drawable.icon_example_rubik , R.string.example_rubik , R.string.example_rubik_subtitle , RubikActivity.class)
|
|
120 |
;
|
|
121 |
|
|
122 |
final int icon, title, subtitle;
|
|
123 |
final Class<? extends Activity> activity;
|
|
124 |
|
|
125 |
Application(int i, int t, int s, Class<? extends Activity> a)
|
|
126 |
{
|
|
127 |
icon = i;
|
|
128 |
title = t;
|
|
129 |
subtitle = s;
|
|
130 |
activity = a;
|
|
131 |
}
|
|
132 |
}
|
|
133 |
|
82 |
134 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
83 |
135 |
|
84 |
136 |
@Override
|
... | ... | |
89 |
141 |
|
90 |
142 |
final List<Map<String, Object>> data = new ArrayList<>();
|
91 |
143 |
final SparseArray<Class<? extends Activity>> activityMapping = new SparseArray<>();
|
92 |
|
|
93 |
|
int i = 0;
|
94 |
144 |
|
95 |
|
{
|
96 |
|
final Map<String, Object> item = new HashMap<>();
|
97 |
|
item.put(ITEM_IMAGE, R.drawable.icon_example_monalisa);
|
98 |
|
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_monalisa));
|
99 |
|
item.put(ITEM_SUBTITLE, getText(R.string.example_monalisa_subtitle));
|
100 |
|
data.add(item);
|
101 |
|
activityMapping.put(i++, MonaLisaActivity.class);
|
102 |
|
}
|
103 |
|
|
104 |
|
{
|
105 |
|
final Map<String, Object> item = new HashMap<>();
|
106 |
|
item.put(ITEM_IMAGE, R.drawable.icon_example_sink);
|
107 |
|
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_sink));
|
108 |
|
item.put(ITEM_SUBTITLE, getText(R.string.example_sink_subtitle));
|
109 |
|
data.add(item);
|
110 |
|
activityMapping.put(i++, SinkActivity.class);
|
111 |
|
}
|
112 |
|
|
113 |
|
{
|
114 |
|
final Map<String, Object> item = new HashMap<>();
|
115 |
|
item.put(ITEM_IMAGE, R.drawable.icon_example_bean);
|
116 |
|
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_bean));
|
117 |
|
item.put(ITEM_SUBTITLE, getText(R.string.example_bean_subtitle));
|
118 |
|
data.add(item);
|
119 |
|
activityMapping.put(i++, BeanActivity.class);
|
120 |
|
}
|
121 |
|
|
122 |
|
{
|
123 |
|
final Map<String, Object> item = new HashMap<>();
|
124 |
|
item.put(ITEM_IMAGE, R.drawable.icon_example_projection);
|
125 |
|
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_projection));
|
126 |
|
item.put(ITEM_SUBTITLE, getText(R.string.example_projection_subtitle));
|
127 |
|
data.add(item);
|
128 |
|
activityMapping.put(i++, ProjectionActivity.class);
|
129 |
|
}
|
130 |
|
|
131 |
|
{
|
132 |
|
final Map<String, Object> item = new HashMap<>();
|
133 |
|
item.put(ITEM_IMAGE, R.drawable.icon_example_deform);
|
134 |
|
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_deform));
|
135 |
|
item.put(ITEM_SUBTITLE, getText(R.string.example_deform_subtitle));
|
136 |
|
data.add(item);
|
137 |
|
activityMapping.put(i++, DeformActivity.class);
|
138 |
|
}
|
139 |
|
|
140 |
|
{
|
141 |
|
final Map<String, Object> item = new HashMap<>();
|
142 |
|
item.put(ITEM_IMAGE, R.drawable.icon_example_listener);
|
143 |
|
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_listener));
|
144 |
|
item.put(ITEM_SUBTITLE, getText(R.string.example_listener_subtitle));
|
145 |
|
data.add(item);
|
146 |
|
activityMapping.put(i++, ListenerActivity.class);
|
147 |
|
}
|
148 |
|
|
149 |
|
{
|
150 |
|
final Map<String, Object> item = new HashMap<>();
|
151 |
|
item.put(ITEM_IMAGE, R.drawable.icon_example_dynamic);
|
152 |
|
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_dynamic));
|
153 |
|
item.put(ITEM_SUBTITLE, getText(R.string.example_dynamic_subtitle));
|
154 |
|
data.add(item);
|
155 |
|
activityMapping.put(i++, DynamicActivity.class);
|
156 |
|
}
|
157 |
|
|
158 |
|
{
|
159 |
|
final Map<String, Object> item = new HashMap<>();
|
160 |
|
item.put(ITEM_IMAGE, R.drawable.icon_example_girl);
|
161 |
|
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_girl));
|
162 |
|
item.put(ITEM_SUBTITLE, getText(R.string.example_girl_subtitle));
|
163 |
|
data.add(item);
|
164 |
|
activityMapping.put(i++, GirlActivity.class);
|
165 |
|
}
|
166 |
|
|
167 |
|
{
|
168 |
|
final Map<String, Object> item = new HashMap<>();
|
169 |
|
item.put(ITEM_IMAGE, R.drawable.icon_example_macroblock);
|
170 |
|
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_macroblock));
|
171 |
|
item.put(ITEM_SUBTITLE, getText(R.string.example_macroblock_subtitle));
|
172 |
|
data.add(item);
|
173 |
|
activityMapping.put(i++, CatAndDogActivity.class);
|
174 |
|
}
|
175 |
|
|
176 |
|
{
|
177 |
|
final Map<String, Object> item = new HashMap<>();
|
178 |
|
item.put(ITEM_IMAGE, R.drawable.icon_example_movingeffects);
|
179 |
|
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_movingeffects));
|
180 |
|
item.put(ITEM_SUBTITLE, getText(R.string.example_movingeffects_subtitle));
|
181 |
|
data.add(item);
|
182 |
|
activityMapping.put(i++, MovingEffectsActivity.class);
|
183 |
|
}
|
184 |
|
|
185 |
|
{
|
186 |
|
final Map<String, Object> item = new HashMap<>();
|
187 |
|
item.put(ITEM_IMAGE, R.drawable.icon_example_differenteffects);
|
188 |
|
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_differenteffects));
|
189 |
|
item.put(ITEM_SUBTITLE, getText(R.string.example_differenteffects_subtitle));
|
190 |
|
data.add(item);
|
191 |
|
activityMapping.put(i++, DifferentEffectsActivity.class);
|
192 |
|
}
|
193 |
|
|
194 |
|
{
|
195 |
|
final Map<String, Object> item = new HashMap<>();
|
196 |
|
item.put(ITEM_IMAGE, R.drawable.icon_example_differentbitmaps);
|
197 |
|
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_differentbitmaps));
|
198 |
|
item.put(ITEM_SUBTITLE, getText(R.string.example_differentbitmaps_subtitle));
|
199 |
|
data.add(item);
|
200 |
|
activityMapping.put(i++, DifferentBitmapsActivity.class);
|
201 |
|
}
|
202 |
|
|
203 |
|
{
|
204 |
|
final Map<String, Object> item = new HashMap<>();
|
205 |
|
item.put(ITEM_IMAGE, R.drawable.icon_example_effectqueue);
|
206 |
|
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_effectqueue));
|
207 |
|
item.put(ITEM_SUBTITLE, getText(R.string.example_effectqueue_subtitle));
|
208 |
|
data.add(item);
|
209 |
|
activityMapping.put(i++, EffectQueueActivity.class);
|
210 |
|
}
|
211 |
|
|
212 |
|
{
|
213 |
|
final Map<String, Object> item = new HashMap<>();
|
214 |
|
item.put(ITEM_IMAGE, R.drawable.icon_example_check);
|
215 |
|
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_check));
|
216 |
|
item.put(ITEM_SUBTITLE, getText(R.string.example_check_subtitle));
|
217 |
|
data.add(item);
|
218 |
|
activityMapping.put(i++, CheckActivity.class);
|
219 |
|
}
|
220 |
|
|
221 |
|
{
|
222 |
|
final Map<String, Object> item = new HashMap<>();
|
223 |
|
item.put(ITEM_IMAGE, R.drawable.icon_example_fbo);
|
224 |
|
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_objecttree));
|
225 |
|
item.put(ITEM_SUBTITLE, getText(R.string.example_objecttree_subtitle));
|
226 |
|
data.add(item);
|
227 |
|
activityMapping.put(i++, ObjectTreeActivity.class);
|
228 |
|
}
|
229 |
|
|
230 |
|
{
|
231 |
|
final Map<String, Object> item = new HashMap<>();
|
232 |
|
item.put(ITEM_IMAGE, R.drawable.icon_example_starwars);
|
233 |
|
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_starwars));
|
234 |
|
item.put(ITEM_SUBTITLE, getText(R.string.example_starwars_subtitle));
|
235 |
|
data.add(item);
|
236 |
|
activityMapping.put(i++, StarWarsActivity.class);
|
237 |
|
}
|
238 |
|
|
239 |
|
{
|
240 |
|
final Map<String, Object> item = new HashMap<>();
|
241 |
|
item.put(ITEM_IMAGE, R.drawable.icon_example_olimpic);
|
242 |
|
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_olimpic));
|
243 |
|
item.put(ITEM_SUBTITLE, getText(R.string.example_olimpic_subtitle));
|
244 |
|
data.add(item);
|
245 |
|
activityMapping.put(i++, OlimpicActivity.class);
|
246 |
|
}
|
247 |
|
|
248 |
|
{
|
249 |
|
final Map<String, Object> item = new HashMap<>();
|
250 |
|
item.put(ITEM_IMAGE, R.drawable.icon_example_quaternion);
|
251 |
|
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_quaternion));
|
252 |
|
item.put(ITEM_SUBTITLE, getText(R.string.example_quaternion_subtitle));
|
253 |
|
data.add(item);
|
254 |
|
activityMapping.put(i++, QuaternionActivity.class);
|
255 |
|
}
|
256 |
|
|
257 |
|
{
|
258 |
|
final Map<String, Object> item = new HashMap<>();
|
259 |
|
item.put(ITEM_IMAGE, R.drawable.icon_example_cubes);
|
260 |
|
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_inflate));
|
261 |
|
item.put(ITEM_SUBTITLE, getText(R.string.example_inflate_subtitle));
|
262 |
|
data.add(item);
|
263 |
|
activityMapping.put(i++, InflateActivity.class);
|
264 |
|
}
|
265 |
|
|
266 |
|
{
|
267 |
|
final Map<String, Object> item = new HashMap<>();
|
268 |
|
item.put(ITEM_IMAGE, R.drawable.icon_example_effects3d);
|
269 |
|
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_effects3d));
|
270 |
|
item.put(ITEM_SUBTITLE, getText(R.string.example_effects3d_subtitle));
|
271 |
|
data.add(item);
|
272 |
|
activityMapping.put(i++, GenericActivity.class);
|
273 |
|
}
|
274 |
|
|
275 |
|
{
|
276 |
|
final Map<String, Object> item = new HashMap<>();
|
277 |
|
item.put(ITEM_IMAGE, R.drawable.icon_example_monalisa);
|
278 |
|
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_plainmonalisa));
|
279 |
|
item.put(ITEM_SUBTITLE, getText(R.string.example_plainmonalisa_subtitle));
|
280 |
|
data.add(item);
|
281 |
|
activityMapping.put(i++, PlainMonaLisaActivity.class);
|
282 |
|
}
|
283 |
|
|
284 |
|
{
|
285 |
|
final Map<String, Object> item = new HashMap<>();
|
286 |
|
item.put(ITEM_IMAGE, R.drawable.icon_example_girl);
|
287 |
|
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_save));
|
288 |
|
item.put(ITEM_SUBTITLE, getText(R.string.example_save_subtitle));
|
289 |
|
data.add(item);
|
290 |
|
activityMapping.put(i++, SaveActivity.class);
|
291 |
|
}
|
292 |
|
|
293 |
|
{
|
294 |
|
final Map<String, Object> item = new HashMap<>();
|
295 |
|
item.put(ITEM_IMAGE, R.drawable.icon_example_flag);
|
296 |
|
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_flag));
|
297 |
|
item.put(ITEM_SUBTITLE, getText(R.string.example_flag_subtitle));
|
298 |
|
data.add(item);
|
299 |
|
activityMapping.put(i++, FlagActivity.class);
|
300 |
|
}
|
301 |
|
|
302 |
|
{
|
303 |
|
final Map<String, Object> item = new HashMap<>();
|
304 |
|
item.put(ITEM_IMAGE, R.drawable.icon_example_wind);
|
305 |
|
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_wind));
|
306 |
|
item.put(ITEM_SUBTITLE, getText(R.string.example_wind_subtitle));
|
307 |
|
data.add(item);
|
308 |
|
activityMapping.put(i++, WindActivity.class);
|
309 |
|
}
|
310 |
|
|
311 |
|
{
|
312 |
|
final Map<String, Object> item = new HashMap<>();
|
313 |
|
item.put(ITEM_IMAGE, R.drawable.icon_example_aroundtheworld);
|
314 |
|
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_aroundtheworld));
|
315 |
|
item.put(ITEM_SUBTITLE, getText(R.string.example_aroundtheworld_subtitle));
|
316 |
|
data.add(item);
|
317 |
|
activityMapping.put(i++, AroundTheWorldActivity.class);
|
318 |
|
}
|
319 |
|
|
320 |
|
{
|
321 |
|
final Map<String, Object> item = new HashMap<>();
|
322 |
|
item.put(ITEM_IMAGE, R.drawable.icon_example_mirror);
|
323 |
|
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_mirror));
|
324 |
|
item.put(ITEM_SUBTITLE, getText(R.string.example_mirror_subtitle));
|
325 |
|
data.add(item);
|
326 |
|
activityMapping.put(i++, MirrorActivity.class);
|
327 |
|
}
|
328 |
|
|
329 |
|
{
|
330 |
|
final Map<String, Object> item = new HashMap<>();
|
331 |
|
item.put(ITEM_IMAGE, R.drawable.icon_example_stencil);
|
332 |
|
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_stencil));
|
333 |
|
item.put(ITEM_SUBTITLE, getText(R.string.example_stencil_subtitle));
|
334 |
|
data.add(item);
|
335 |
|
activityMapping.put(i++, StencilActivity.class);
|
336 |
|
}
|
337 |
|
|
338 |
|
{
|
339 |
|
final Map<String, Object> item = new HashMap<>();
|
340 |
|
item.put(ITEM_IMAGE, R.drawable.icon_example_blur);
|
341 |
|
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_blur));
|
342 |
|
item.put(ITEM_SUBTITLE, getText(R.string.example_blur_subtitle));
|
343 |
|
data.add(item);
|
344 |
|
activityMapping.put(i++, BlurActivity.class);
|
345 |
|
}
|
346 |
|
|
347 |
|
{
|
348 |
|
final Map<String, Object> item = new HashMap<>();
|
349 |
|
item.put(ITEM_IMAGE, R.drawable.icon_example_multiblur);
|
350 |
|
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_multiblur));
|
351 |
|
item.put(ITEM_SUBTITLE, getText(R.string.example_multiblur_subtitle));
|
352 |
|
data.add(item);
|
353 |
|
activityMapping.put(i++, MultiblurActivity.class);
|
354 |
|
}
|
355 |
|
|
356 |
|
{
|
357 |
|
final Map<String, Object> item = new HashMap<>();
|
358 |
|
item.put(ITEM_IMAGE, R.drawable.icon_example_triblur);
|
359 |
|
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_triblur));
|
360 |
|
item.put(ITEM_SUBTITLE, getText(R.string.example_triblur_subtitle));
|
361 |
|
data.add(item);
|
362 |
|
activityMapping.put(i++, TriblurActivity.class);
|
363 |
|
}
|
364 |
|
|
365 |
|
{
|
366 |
|
final Map<String, Object> item = new HashMap<>();
|
367 |
|
item.put(ITEM_IMAGE, R.drawable.icon_example_transparency);
|
368 |
|
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_transparency));
|
369 |
|
item.put(ITEM_SUBTITLE, getText(R.string.example_transparency_subtitle));
|
370 |
|
data.add(item);
|
371 |
|
activityMapping.put(i++, TransparencyActivity.class);
|
372 |
|
}
|
373 |
|
|
374 |
|
{
|
375 |
|
final Map<String, Object> item = new HashMap<>();
|
376 |
|
item.put(ITEM_IMAGE, R.drawable.icon_example_postprocesstree);
|
377 |
|
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_postprocesstree));
|
378 |
|
item.put(ITEM_SUBTITLE, getText(R.string.example_postprocesstree_subtitle));
|
379 |
|
data.add(item);
|
380 |
|
activityMapping.put(i++, PostprocessTreeActivity.class);
|
381 |
|
}
|
|
145 |
int index=0;
|
382 |
146 |
|
383 |
|
{
|
384 |
|
final Map<String, Object> item = new HashMap<>();
|
385 |
|
item.put(ITEM_IMAGE, R.drawable.icon_example_glow);
|
386 |
|
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_glow));
|
387 |
|
item.put(ITEM_SUBTITLE, getText(R.string.example_glow_subtitle));
|
388 |
|
data.add(item);
|
389 |
|
activityMapping.put(i++, GlowActivity.class);
|
390 |
|
}
|
391 |
|
|
392 |
|
{
|
393 |
|
final Map<String, Object> item = new HashMap<>();
|
394 |
|
item.put(ITEM_IMAGE, R.drawable.icon_example_movingglow);
|
395 |
|
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_moving_glow));
|
396 |
|
item.put(ITEM_SUBTITLE, getText(R.string.example_moving_glow_subtitle));
|
397 |
|
data.add(item);
|
398 |
|
activityMapping.put(i++, MovingGlowActivity.class);
|
399 |
|
}
|
400 |
|
|
401 |
|
{
|
402 |
|
final Map<String, Object> item = new HashMap<>();
|
403 |
|
item.put(ITEM_IMAGE, R.drawable.icon_example_earth);
|
404 |
|
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_earth));
|
405 |
|
item.put(ITEM_SUBTITLE, getText(R.string.example_earth_subtitle));
|
406 |
|
data.add(item);
|
407 |
|
activityMapping.put(i++, EarthActivity.class);
|
408 |
|
}
|
409 |
|
|
410 |
|
{
|
411 |
|
final Map<String, Object> item = new HashMap<>();
|
412 |
|
item.put(ITEM_IMAGE, R.drawable.icon_example_rubik);
|
413 |
|
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_rubik));
|
414 |
|
item.put(ITEM_SUBTITLE, getText(R.string.example_rubik_subtitle));
|
415 |
|
data.add(item);
|
416 |
|
activityMapping.put(i++, RubikActivity.class);
|
417 |
|
}
|
418 |
|
|
419 |
|
final SimpleAdapter dataAdapter = new SimpleAdapter(this, data, R.layout.toc_item, new String[] {ITEM_IMAGE, ITEM_TITLE, ITEM_SUBTITLE}, new int[] {R.id.Image, R.id.Title, R.id.SubTitle});
|
|
147 |
for( Application app : Application.values() )
|
|
148 |
{
|
|
149 |
final Map<String, Object> item = new HashMap<>();
|
|
150 |
item.put(ITEM_IMAGE, app.icon);
|
|
151 |
item.put(ITEM_TITLE, (index+1)+". "+getText(app.title));
|
|
152 |
item.put(ITEM_SUBTITLE, getText(app.subtitle));
|
|
153 |
data.add(item);
|
|
154 |
activityMapping.put(index++, app.activity);
|
|
155 |
}
|
|
156 |
|
|
157 |
final SimpleAdapter dataAdapter = new SimpleAdapter( this,
|
|
158 |
data,
|
|
159 |
R.layout.toc_item,
|
|
160 |
new String[] {ITEM_IMAGE, ITEM_TITLE, ITEM_SUBTITLE},
|
|
161 |
new int[] {R.id.Image, R.id.Title, R.id.SubTitle} );
|
420 |
162 |
setListAdapter(dataAdapter);
|
421 |
163 |
|
422 |
164 |
getListView().setOnItemClickListener(new OnItemClickListener()
|
Improve the application list.