diff options
| author | Bananeweizen <bananeweizen@gmx.de> | 2013-11-10 16:48:06 +0100 |
|---|---|---|
| committer | Bananeweizen <bananeweizen@gmx.de> | 2013-11-10 16:48:22 +0100 |
| commit | e4627ac2425adbdddf6f7750eb2cbba7f5e3204b (patch) | |
| tree | 5caf6724210818cbc91b57fc4313e7a9a95cff90 /main/src/cgeo/geocaching/Waypoint.java | |
| parent | 4fa47e217d80347d0f39e7c2d6b9719436f3234f (diff) | |
| download | cgeo-e4627ac2425adbdddf6f7750eb2cbba7f5e3204b.zip cgeo-e4627ac2425adbdddf6f7750eb2cbba7f5e3204b.tar.gz cgeo-e4627ac2425adbdddf6f7750eb2cbba7f5e3204b.tar.bz2 | |
fix #3420: Waypoint description gets mixed up
Diffstat (limited to 'main/src/cgeo/geocaching/Waypoint.java')
| -rw-r--r-- | main/src/cgeo/geocaching/Waypoint.java | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/main/src/cgeo/geocaching/Waypoint.java b/main/src/cgeo/geocaching/Waypoint.java index b204bdd..6f28aa1 100644 --- a/main/src/cgeo/geocaching/Waypoint.java +++ b/main/src/cgeo/geocaching/Waypoint.java @@ -5,11 +5,6 @@ import cgeo.geocaching.geopoint.Geopoint; import org.apache.commons.lang3.StringUtils; -import android.content.res.Resources; -import android.graphics.drawable.Drawable; -import android.graphics.drawable.LayerDrawable; -import android.widget.TextView; - import java.util.HashMap; import java.util.List; import java.util.Map; @@ -33,13 +28,6 @@ public class Waypoint implements IWaypoint, Comparable<Waypoint> { private int cachedOrder = ORDER_UNDEFINED; private boolean own = false; private boolean visited = false; - // preliminary default for mdpi screens - private static int VISITED_INSET = 7; - - public static void initializeScale() { - // Calculate visited inset based on screen density - VISITED_INSET = (int) (6.6f * CgeoApplication.getInstance().getResources().getDisplayMetrics().density + 0.5f); - } /** * require name and type for every waypoint @@ -64,22 +52,6 @@ public class Waypoint implements IWaypoint, Comparable<Waypoint> { id = -1; } - public void setIcon(final Resources res, final TextView nameView) { - Drawable icon; - if (visited) { - LayerDrawable ld = new LayerDrawable(new Drawable[] { - res.getDrawable(waypointType.markerId), - res.getDrawable(R.drawable.tick) }); - ld.setLayerInset(0, 0, 0, VISITED_INSET, VISITED_INSET); - ld.setLayerInset(1, VISITED_INSET, VISITED_INSET, 0, 0); - icon = ld; - } else { - icon = res.getDrawable(waypointType.markerId); - } - final Drawable fIcon = icon; - nameView.setCompoundDrawablesWithIntrinsicBounds(fIcon, null, null, null); - } - public void merge(final Waypoint old) { if (StringUtils.isBlank(prefix)) { setPrefix(old.prefix); |
