Revision 164a5c5f
Added by Leszek Koltunski over 6 years ago
src/main/java/org/distorted/examples/TableOfContents.java | ||
---|---|---|
91 | 91 |
|
92 | 92 |
int i = 0; |
93 | 93 |
|
94 |
|
|
95 |
{ |
|
96 |
final Map<String, Object> item = new HashMap<>(); |
|
97 |
item.put(ITEM_IMAGE, R.drawable.icon_example_multiblur); |
|
98 |
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_multiblur)); |
|
99 |
item.put(ITEM_SUBTITLE, getText(R.string.example_multiblur_subtitle)); |
|
100 |
data.add(item); |
|
101 |
activityMapping.put(i++, MultiblurActivity.class); |
|
102 |
} |
|
103 |
|
|
104 |
{ |
|
105 |
final Map<String, Object> item = new HashMap<>(); |
|
106 |
item.put(ITEM_IMAGE, R.drawable.icon_example_movingglow); |
|
107 |
item.put(ITEM_TITLE, (i+1)+". "+getText(R.string.example_moving_glow)); |
|
108 |
item.put(ITEM_SUBTITLE, getText(R.string.example_moving_glow_subtitle)); |
|
109 |
data.add(item); |
|
110 |
activityMapping.put(i++, MovingGlowActivity.class); |
|
111 |
} |
|
112 |
|
|
94 | 113 |
{ |
95 | 114 |
final Map<String, Object> item = new HashMap<>(); |
96 | 115 |
item.put(ITEM_IMAGE, R.drawable.icon_example_monalisa); |
... | ... | |
342 | 361 |
data.add(item); |
343 | 362 |
activityMapping.put(i++, BlurActivity.class); |
344 | 363 |
} |
345 |
|
|
364 |
/* |
|
346 | 365 |
{ |
347 | 366 |
final Map<String, Object> item = new HashMap<>(); |
348 | 367 |
item.put(ITEM_IMAGE, R.drawable.icon_example_multiblur); |
... | ... | |
351 | 370 |
data.add(item); |
352 | 371 |
activityMapping.put(i++, MultiblurActivity.class); |
353 | 372 |
} |
354 |
|
|
373 |
*/ |
|
355 | 374 |
{ |
356 | 375 |
final Map<String, Object> item = new HashMap<>(); |
357 | 376 |
item.put(ITEM_IMAGE, R.drawable.icon_example_triblur); |
... | ... | |
396 | 415 |
data.add(item); |
397 | 416 |
activityMapping.put(i++, GlowActivity.class); |
398 | 417 |
} |
399 |
|
|
418 |
/* |
|
400 | 419 |
{ |
401 | 420 |
final Map<String, Object> item = new HashMap<>(); |
402 | 421 |
item.put(ITEM_IMAGE, R.drawable.icon_example_movingglow); |
... | ... | |
405 | 424 |
data.add(item); |
406 | 425 |
activityMapping.put(i++, MovingGlowActivity.class); |
407 | 426 |
} |
408 |
|
|
427 |
*/ |
|
409 | 428 |
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}); |
410 | 429 |
setListAdapter(dataAdapter); |
411 | 430 |
|
Also available in: Unified diff
Postprocessing: dont crash when we fail to compile postprocessing programs