diff options
Diffstat (limited to 'main/src/cgeo/geocaching/cgeoadvsearch.java')
| -rw-r--r-- | main/src/cgeo/geocaching/cgeoadvsearch.java | 32 |
1 files changed, 5 insertions, 27 deletions
diff --git a/main/src/cgeo/geocaching/cgeoadvsearch.java b/main/src/cgeo/geocaching/cgeoadvsearch.java index 8caf67d..020fb00 100644 --- a/main/src/cgeo/geocaching/cgeoadvsearch.java +++ b/main/src/cgeo/geocaching/cgeoadvsearch.java @@ -129,12 +129,7 @@ public class cgeoadvsearch extends AbstractActivity { found = true; } else { // keyword (fallback) - final Intent cachesIntent = new Intent(this, cgeocaches.class); - cachesIntent.putExtra("type", "keyword"); - cachesIntent.putExtra("keyword", query); - cachesIntent.putExtra("cachetype", Settings.getCacheType()); - startActivity(cachesIntent); - + cgeocaches.startActivityKeyword(this, query); found = true; } } catch (Exception e) { @@ -268,12 +263,7 @@ public class cgeoadvsearch extends AbstractActivity { } } else { try { - final Intent cachesIntent = new Intent(this, cgeocaches.class); - cachesIntent.putExtra("latitude", GeopointParser.parseLatitude(latText)); - cachesIntent.putExtra("longitude", GeopointParser.parseLongitude(lonText)); - cachesIntent.putExtra("type", "coordinate"); - cachesIntent.putExtra("cachetype", Settings.getCacheType()); - startActivity(cachesIntent); + cgeocaches.startActivityCoordinates(this, GeopointParser.parseLatitude(latText), GeopointParser.parseLongitude(lonText)); } catch (GeopointParser.ParseException e) { showToast(res.getString(e.resource)); } @@ -309,11 +299,7 @@ public class cgeoadvsearch extends AbstractActivity { return; } - final Intent cachesIntent = new Intent(this, cgeocaches.class); - cachesIntent.putExtra("type", "keyword"); - cachesIntent.putExtra("keyword", keyText); - cachesIntent.putExtra("cachetype", Settings.getCacheType()); - startActivity(cachesIntent); + cgeocaches.startActivityKeyword(this, keyText); } private class findByAddressAction implements TextView.OnEditorActionListener { @@ -377,11 +363,7 @@ public class cgeoadvsearch extends AbstractActivity { return; } - final Intent cachesIntent = new Intent(this, cgeocaches.class); - cachesIntent.putExtra("type", "username"); - cachesIntent.putExtra("username", usernameText); - cachesIntent.putExtra("cachetype", Settings.getCacheType()); - startActivity(cachesIntent); + cgeocaches.startActivityUserName(this, usernameText); } private class findByOwnerAction implements TextView.OnEditorActionListener { @@ -409,11 +391,7 @@ public class cgeoadvsearch extends AbstractActivity { return; } - final Intent cachesIntent = new Intent(this, cgeocaches.class); - cachesIntent.putExtra("type", "owner"); - cachesIntent.putExtra("username", usernameText); - cachesIntent.putExtra("cachetype", Settings.getCacheType()); - startActivity(cachesIntent); + cgeocaches.startActivityOwner(this, usernameText); } private class findByGeocodeAction implements TextView.OnEditorActionListener { |
