aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/export/ExportFactory.java
diff options
context:
space:
mode:
authorSammysHP <sven@sammyshp.de>2012-04-09 11:04:50 +0200
committerSammysHP <sven@sammyshp.de>2012-04-09 13:39:08 +0200
commit298283f1ab580f1c704f68fc51267916180511ed (patch)
tree2b026e6e1fc1fc8cf3bf268c12b59ad928a279e6 /main/src/cgeo/geocaching/export/ExportFactory.java
parente4e95a7a4660b4534427c78b1d00dd80b899a558 (diff)
downloadcgeo-298283f1ab580f1c704f68fc51267916180511ed.zip
cgeo-298283f1ab580f1c704f68fc51267916180511ed.tar.gz
cgeo-298283f1ab580f1c704f68fc51267916180511ed.tar.bz2
Export package: Documentation and make activity optional
Diffstat (limited to 'main/src/cgeo/geocaching/export/ExportFactory.java')
-rw-r--r--main/src/cgeo/geocaching/export/ExportFactory.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/main/src/cgeo/geocaching/export/ExportFactory.java b/main/src/cgeo/geocaching/export/ExportFactory.java
index 01343c3..dd3a6f4 100644
--- a/main/src/cgeo/geocaching/export/ExportFactory.java
+++ b/main/src/cgeo/geocaching/export/ExportFactory.java
@@ -13,7 +13,13 @@ import android.widget.TextView;
import java.util.List;
+/**
+ * Factory to create a dialog with all available exporters.
+ */
public class ExportFactory {
+ /**
+ * Contains instances of all available exporters.
+ */
public enum Exporters {
FIELDNOTES(new FieldnoteExport()),
GPX(new GpxExport());
@@ -25,6 +31,14 @@ public class ExportFactory {
public final Export exporter;
}
+ /**
+ * Creates a dialog so that the user can select an exporter.
+ *
+ * @param caches
+ * The {@link List} of {@link cgCache} to be exported
+ * @param activity
+ * The {@link Activity} in whose context the dialog should be shown
+ */
public static void showExportMenu(final List<cgCache> caches, final Activity activity) {
final AlertDialog.Builder builder = new AlertDialog.Builder(activity);
builder.setTitle(R.string.export).setIcon(android.R.drawable.ic_menu_share);