aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/WaypointPopup.java
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/cgeo/geocaching/WaypointPopup.java')
-rw-r--r--main/src/cgeo/geocaching/WaypointPopup.java19
1 files changed, 9 insertions, 10 deletions
diff --git a/main/src/cgeo/geocaching/WaypointPopup.java b/main/src/cgeo/geocaching/WaypointPopup.java
index 7fbfe10..766d43d 100644
--- a/main/src/cgeo/geocaching/WaypointPopup.java
+++ b/main/src/cgeo/geocaching/WaypointPopup.java
@@ -17,9 +17,8 @@ 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 cgWaypoint waypoint = null;
+ private Waypoint waypoint = null;
public WaypointPopup() {
super("c:geo-waypoint-info", R.layout.waypoint_popup);
@@ -31,19 +30,19 @@ 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);
}
}
@Override
protected void init() {
super.init();
- waypoint = app.loadWaypoint(waypointId);
+ waypoint = cgData.loadWaypoint(waypointId);
try {
if (StringUtils.isNotBlank(waypoint.getName())) {
setTitle(waypoint.getName());
} else {
- setTitle(waypoint.getGeocode().toUpperCase());
+ setTitle(waypoint.getGeocode());
}
// actionbar icon
@@ -53,7 +52,7 @@ public class WaypointPopup extends AbstractPopupActivity {
details = new CacheDetailsCreator(this, (LinearLayout) findViewById(R.id.waypoint_details_list));
//Waypoint geocode
- details.add(R.string.cache_geocode, waypoint.getPrefix().toUpperCase() + waypoint.getGeocode().toUpperCase().substring(2));
+ details.add(R.string.cache_geocode, waypoint.getPrefix() + waypoint.getGeocode().substring(2));
// Edit Button
final Button buttonEdit = (Button) findViewById(R.id.edit);
@@ -73,7 +72,7 @@ public class WaypointPopup extends AbstractPopupActivity {
addCacheDetails();
} catch (Exception e) {
- Log.e("cgeopopup.init: " + e.toString());
+ Log.e("cgeopopup.init", e);
}
}
@@ -83,7 +82,7 @@ public class WaypointPopup extends AbstractPopupActivity {
}
/**
- * Tries to navigate to the {@link cgCache} of this activity.
+ * Tries to navigate to the {@link Geocache} of this activity.
*/
@Override
protected void startDefaultNavigation2() {
@@ -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);
}