Android Open Source - ambient-nights Menu






From Project

Back to project page ambient-nights.

License

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 s.co  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) {
    ITEMS.add(item);
    ITEM_MAP.put(item.id, 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) {
      this.id = id;
      this.content = content;
    }

    @Override
    public String toString() {
      return content;
    }
  }
}




Java Source Code List

com.cs371mproject.ambientnights.ThemeDetailActivity.java
com.cs371mproject.ambientnights.ThemeDetailFragment.java
com.cs371mproject.ambientnights.ThemeListActivity.java
com.cs371mproject.ambientnights.ThemeListFragment.java
com.cs371mproject.ambientnights.content.Menu.java
com.cs371mproject.ambientnights.content.Theme.java
com.cs371mproject.ambientnights.player.PlayScreen.java
com.cs371mproject.ambientnights.player.PlayerIntentReceiver.java
com.cs371mproject.ambientnights.player.Player.java