Revision 3315386a
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 |
|
|
113 | 94 |
{ |
114 | 95 |
final Map<String, Object> item = new HashMap<>(); |
115 | 96 |
item.put(ITEM_IMAGE, R.drawable.icon_example_monalisa); |
... | ... | |
361 | 342 |
data.add(item); |
362 | 343 |
activityMapping.put(i++, BlurActivity.class); |
363 | 344 |
} |
364 |
/* |
|
345 |
|
|
365 | 346 |
{ |
366 | 347 |
final Map<String, Object> item = new HashMap<>(); |
367 | 348 |
item.put(ITEM_IMAGE, R.drawable.icon_example_multiblur); |
... | ... | |
370 | 351 |
data.add(item); |
371 | 352 |
activityMapping.put(i++, MultiblurActivity.class); |
372 | 353 |
} |
373 |
*/ |
|
354 |
|
|
374 | 355 |
{ |
375 | 356 |
final Map<String, Object> item = new HashMap<>(); |
376 | 357 |
item.put(ITEM_IMAGE, R.drawable.icon_example_triblur); |
... | ... | |
415 | 396 |
data.add(item); |
416 | 397 |
activityMapping.put(i++, GlowActivity.class); |
417 | 398 |
} |
418 |
/* |
|
399 |
|
|
419 | 400 |
{ |
420 | 401 |
final Map<String, Object> item = new HashMap<>(); |
421 | 402 |
item.put(ITEM_IMAGE, R.drawable.icon_example_movingglow); |
... | ... | |
424 | 405 |
data.add(item); |
425 | 406 |
activityMapping.put(i++, MovingGlowActivity.class); |
426 | 407 |
} |
427 |
*/ |
|
408 |
|
|
428 | 409 |
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}); |
429 | 410 |
setListAdapter(dataAdapter); |
430 | 411 |
|
Also available in: Unified diff
OIT: correct depth