aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/cgeogpxes.java
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2011-10-12 07:43:22 +0200
committerBananeweizen <bananeweizen@gmx.de>2011-10-12 07:43:22 +0200
commit862a05d3cf1e67d9e4e581b02e9818c41639a79d (patch)
tree8cf1911eacafacb978e5b41190132341ba1d8db3 /main/src/cgeo/geocaching/cgeogpxes.java
parentc727dbe4119a8b798a94588abe1010dcabfebbb4 (diff)
downloadcgeo-862a05d3cf1e67d9e4e581b02e9818c41639a79d.zip
cgeo-862a05d3cf1e67d9e4e581b02e9818c41639a79d.tar.gz
cgeo-862a05d3cf1e67d9e4e581b02e9818c41639a79d.tar.bz2
new: support Geocaching Australia caches (GAxxxx, TPxxxx)
* most cache details are not available due to wrong schema in their GPX files, but I requested them to change that
Diffstat (limited to 'main/src/cgeo/geocaching/cgeogpxes.java')
-rw-r--r--main/src/cgeo/geocaching/cgeogpxes.java17
1 files changed, 11 insertions, 6 deletions
diff --git a/main/src/cgeo/geocaching/cgeogpxes.java b/main/src/cgeo/geocaching/cgeogpxes.java
index acee766..8e5d22b 100644
--- a/main/src/cgeo/geocaching/cgeogpxes.java
+++ b/main/src/cgeo/geocaching/cgeogpxes.java
@@ -35,6 +35,10 @@ public class cgeogpxes extends FileList<cgGPXListAdapter> {
public void handleMessage(Message msg) {
if (parseDialog != null) {
parseDialog.setMessage(res.getString(msg.arg1) + " " + msg.arg2);
+ if (msg.obj != null) {
+ final int progress = (Integer) msg.obj;
+ parseDialog.setProgress(progress);
+ }
}
}
};
@@ -82,12 +86,13 @@ public class cgeogpxes extends FileList<cgGPXListAdapter> {
public void loadGPX(File file) {
- parseDialog = ProgressDialog.show(
- this,
- res.getString(R.string.gpx_import_title_reading_file),
- res.getString(R.string.gpx_import_loading),
- true,
- false);
+ parseDialog = new ProgressDialog(this);
+ parseDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
+ parseDialog.setTitle(res.getString(R.string.gpx_import_title_reading_file));
+ parseDialog.setMessage(res.getString(R.string.gpx_import_loading));
+ parseDialog.setCancelable(false);
+ parseDialog.setMax((int) file.length());
+ parseDialog.show();
new loadCaches(file).start();
}