<NME> UrlPopup.java
<BEF> ADDFILE
<MSG> refactoring: remove duplicated code
<DFF> @@ -0,0 +1,40 @@
+package cgeo.geocaching.ui;
+
+import cgeo.geocaching.R;
+
+import android.app.AlertDialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.net.Uri;
+
+public class UrlPopup {
+
+    private final Context context;
+
+    public UrlPopup(final Context context) {
+        this.context = context;
+    }
+
+    public void show(final String title, final String message, final String url, final String urlButtonTitle) {
+        AlertDialog.Builder builder = new AlertDialog.Builder(context);
+        builder.setMessage(message)
+                .setIcon(android.R.drawable.ic_dialog_info)
+                .setTitle(title)
+                .setPositiveButton(R.string.err_none, new DialogInterface.OnClickListener() {
+                    @Override
+                    public void onClick(DialogInterface dialog, int id) {
+                        dialog.cancel();
+                    }
+                })
+                .setNegativeButton(urlButtonTitle, new DialogInterface.OnClickListener() {
+                    @Override
+                    public void onClick(DialogInterface dialog, int id) {
+                        Intent i = new Intent(Intent.ACTION_VIEW);
+                        i.setData(Uri.parse(url));
+                        context.startActivity(i);
+                    }
+                });
+        builder.create().show();
+    }
+}

refactoring: remove duplicated code