Back to project page HapiPodcastJ.
The source code is released under:
GNU General Public License
If you think the Android project HapiPodcastJ listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package info.xuluan.podcast.utils; //from w ww . ja v a 2 s. co m import java.util.ArrayList; public class DialogMenu { private ArrayList<MenuItem> mMenuItems; private String[] mDialogItems; private String mDialogHeader; public DialogMenu() { mMenuItems = new ArrayList<MenuItem>(); } public void setHeader(String header) { mDialogHeader = header; } public String getHeader() { return mDialogHeader; } public void addMenu(int i, String str) { mMenuItems.add(new MenuItem(i,str)); } public String[] getItems() { mDialogItems = new String[mMenuItems.size()]; for(int i=0;i<mMenuItems.size();i++) { mDialogItems[i] = mMenuItems.get(i).title; } return mDialogItems; } public int getSelect(int sel) { return mMenuItems.get(sel).id; } class MenuItem { public int id; public String title; public MenuItem(int i, String str) { id = i; title = str; } } }