diff options
Diffstat (limited to 'main/src/cgeo/geocaching/activity/Progress.java')
-rw-r--r-- | main/src/cgeo/geocaching/activity/Progress.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/activity/Progress.java b/main/src/cgeo/geocaching/activity/Progress.java index ddb98b2..6edf23e 100644 --- a/main/src/cgeo/geocaching/activity/Progress.java +++ b/main/src/cgeo/geocaching/activity/Progress.java @@ -2,6 +2,7 @@ package cgeo.geocaching.activity; import android.app.ProgressDialog; import android.content.Context; +import android.os.Message; /** * progress dialog wrapper for easier management of resources @@ -17,9 +18,12 @@ public class Progress { dialog = null; } - public synchronized void show(Context context, String title, String message, boolean indeterminate, boolean cancelable) { + public synchronized void show(final Context context, final String title, final String message, final boolean indeterminate, final Message cancelMessage) { if (dialog == null) { - dialog = ProgressDialog.show(context, title, message, indeterminate, cancelable); + dialog = ProgressDialog.show(context, title, message, indeterminate, cancelMessage != null); + if (cancelMessage != null) { + dialog.setCancelMessage(cancelMessage); + } } } |