diff options
Diffstat (limited to 'main/src/cgeo/geocaching/list/PseudoList.java')
| -rw-r--r-- | main/src/cgeo/geocaching/list/PseudoList.java | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/main/src/cgeo/geocaching/list/PseudoList.java b/main/src/cgeo/geocaching/list/PseudoList.java new file mode 100644 index 0000000..365d6fd --- /dev/null +++ b/main/src/cgeo/geocaching/list/PseudoList.java @@ -0,0 +1,37 @@ +package cgeo.geocaching.list; + +import cgeo.geocaching.CgeoApplication; +import cgeo.geocaching.R; + +public class PseudoList extends AbstractList { + + private static final int ALL_LIST_ID = 2; + /** + * list entry to show all caches + */ + public static final PseudoList ALL_LIST = new PseudoList(ALL_LIST_ID, R.string.list_all_lists); + + private static final int NEW_LIST_ID = 3; + /** + * list entry to create a new list + */ + public static final AbstractList NEW_LIST = new PseudoList(NEW_LIST_ID, R.string.list_menu_create); + + /** + * private constructor to have all instances as constants in the class + */ + private PseudoList(int id, final int titleResourceId) { + super(id, CgeoApplication.getInstance().getResources().getString(titleResourceId)); + } + + @Override + public String getTitleAndCount() { + return "<" + title + ">"; + } + + @Override + public boolean isConcrete() { + return false; + } + +} |
