Roll NDK to pick std::deque patch.
[android_tools.git] / sdk / tools / templates / other / ListFragment / root / src / app_package / dummy / DummyContent.java.ftl
blob3545ba327bea9130d3bbd49838a280d5c5af13a0
1 package ${packageName}.dummy;
3 import java.util.ArrayList;
4 import java.util.HashMap;
5 import java.util.List;
6 import java.util.Map;
8 /**
9  * Helper class for providing sample content for user interfaces created by
10  * Android template wizards.
11  * <p>
12  * TODO: Replace all uses of this class before publishing your app.
13  */
14 public class DummyContent {
16     /**
17      * An array of sample (dummy) items.
18      */
19     public static List<DummyItem> ITEMS = new ArrayList<DummyItem>();
21     /**
22      * A map of sample (dummy) items, by ID.
23      */
24     public static Map<String, DummyItem> ITEM_MAP = new HashMap<String, DummyItem>();
26     static {
27         // Add 3 sample items.
28         addItem(new DummyItem("1", "Item 1"));
29         addItem(new DummyItem("2", "Item 2"));
30         addItem(new DummyItem("3", "Item 3"));
31     }
33     private static void addItem(DummyItem item) {
34         ITEMS.add(item);
35         ITEM_MAP.put(item.id, item);
36     }
38     /**
39      * A dummy item representing a piece of content.
40      */
41     public static class DummyItem {
42         public String id;
43         public String content;
45         public DummyItem(String id, String content) {
46             this.id = id;
47             this.content = content;
48         }
50         @Override
51         public String toString() {
52             return content;
53         }
54     }