diff options
| author | Samuel Tardieu <sam@rfc1149.net> | 2013-01-27 00:04:24 +0100 |
|---|---|---|
| committer | Samuel Tardieu <sam@rfc1149.net> | 2013-01-27 01:02:15 +0100 |
| commit | 2d802377e0da124e2dcb32758180ec313a8d9388 (patch) | |
| tree | ca7a420ed768c6f6fb58fc393aab4a77d906e323 /main/src/cgeo/geocaching/WaypointPopup.java | |
| parent | 1139fc83197316f0ababb5cd365cbb440b632e3b (diff) | |
| download | cgeo-2d802377e0da124e2dcb32758180ec313a8d9388.zip cgeo-2d802377e0da124e2dcb32758180ec313a8d9388.tar.gz cgeo-2d802377e0da124e2dcb32758180ec313a8d9388.tar.bz2 | |
Isolate intent extras into a new class
Diffstat (limited to 'main/src/cgeo/geocaching/WaypointPopup.java')
| -rw-r--r-- | main/src/cgeo/geocaching/WaypointPopup.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/main/src/cgeo/geocaching/WaypointPopup.java b/main/src/cgeo/geocaching/WaypointPopup.java index a69b729..1d18987 100644 --- a/main/src/cgeo/geocaching/WaypointPopup.java +++ b/main/src/cgeo/geocaching/WaypointPopup.java @@ -17,7 +17,6 @@ import android.widget.LinearLayout; import android.widget.TextView; public class WaypointPopup extends AbstractPopupActivity { - private static final String EXTRA_WAYPOINT_ID = "waypoint_id"; private int waypointId = 0; private Waypoint waypoint = null; @@ -31,7 +30,7 @@ public class WaypointPopup extends AbstractPopupActivity { // get parameters final Bundle extras = getIntent().getExtras(); if (extras != null) { - waypointId = extras.getInt(EXTRA_WAYPOINT_ID); + waypointId = extras.getInt(Intents.EXTRA_WAYPOINT_ID); } } @@ -97,8 +96,8 @@ public class WaypointPopup extends AbstractPopupActivity { public static void startActivity(final Context context, final int waypointId, final String geocode) { final Intent popupIntent = new Intent(context, WaypointPopup.class); - popupIntent.putExtra(EXTRA_WAYPOINT_ID, waypointId); - popupIntent.putExtra(EXTRA_GEOCODE, geocode); + popupIntent.putExtra(Intents.EXTRA_WAYPOINT_ID, waypointId); + popupIntent.putExtra(Intents.EXTRA_GEOCODE, geocode); context.startActivity(popupIntent); } |
