Android Open Source - ambient-nights Menu

From Project

Back to project page ambient-nights.


The source code is released under:

MIT License

If you think the Android project ambient-nights listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.cs371mproject.ambientnights.content;
/*from www.j  a va  2  m*/
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

 * Helper class for providing sample content for user interfaces created by
 * Android template wizards.
 * <p>
 * TODO: Replace all uses of this class before publishing your app.
public class Menu {

   * An array of sample (dummy) items.
  public static List<Theme> ITEMS = new ArrayList<Theme>();

   * A map of sample (dummy) items, by ID.
  public static Map<String, Theme> ITEM_MAP = new HashMap<String, Theme>();

  static {
    // Add the themes
    addItem(new Theme("1", "Jungle"));
    addItem(new Theme("2", "Ocean"));
    addItem(new Theme("3", "Rain"));
    addItem(new Theme("4", "River"));

  private static void addItem(Theme item) {
    ITEM_MAP.put(, item);

   * A dummy item representing a piece of content.
  public static class Theme {
    public String id;
    public String content;

    public Theme(String id, String content) { = id;
      this.content = content;

    public String toString() {
      return content;

Java Source Code List