aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/project/attributes/svgs/firstaid.svg6
-rw-r--r--main/res/drawable-mdpi/attribute_firstaid.pngbin657 -> 663 bytes
-rw-r--r--main/src/cgeo/geocaching/CacheDetailActivity.java2
-rw-r--r--main/src/cgeo/geocaching/enumerations/CacheAttribute.java23
-rw-r--r--main/src/cgeo/geocaching/export/GpxExport.java2
5 files changed, 19 insertions, 14 deletions
diff --git a/main/project/attributes/svgs/firstaid.svg b/main/project/attributes/svgs/firstaid.svg
index 601aeec..639c33e 100644
--- a/main/project/attributes/svgs/firstaid.svg
+++ b/main/project/attributes/svgs/firstaid.svg
@@ -43,8 +43,8 @@
id="namedview2905"
showgrid="false"
inkscape:zoom="2.3602597"
- inkscape:cx="50.000003"
- inkscape:cy="49.994502"
+ inkscape:cx="-135.99648"
+ inkscape:cy="49.994504"
inkscape:window-x="49"
inkscape:window-y="24"
inkscape:window-maximized="0"
@@ -52,6 +52,6 @@
<polygon
points="67.298,0 67.298,32.713 100,32.713 100,67.333 67.562,67.333 67.562,99.989 32.702,99.989 32.702,67.333 0,67.333 0,32.713 32.569,32.713 32.569,0 "
id="polygon2903"
- style="fill:#ffffff"
+ style="fill:#a00000;fill-opacity:1"
transform="matrix(0.79661017,0,0,0.79661017,10.169491,10.168373)" />
</svg> \ No newline at end of file
diff --git a/main/res/drawable-mdpi/attribute_firstaid.png b/main/res/drawable-mdpi/attribute_firstaid.png
index d1073f5..0497b53 100644
--- a/main/res/drawable-mdpi/attribute_firstaid.png
+++ b/main/res/drawable-mdpi/attribute_firstaid.png
Binary files differ
diff --git a/main/src/cgeo/geocaching/CacheDetailActivity.java b/main/src/cgeo/geocaching/CacheDetailActivity.java
index 7921bc4..a3535a6 100644
--- a/main/src/cgeo/geocaching/CacheDetailActivity.java
+++ b/main/src/cgeo/geocaching/CacheDetailActivity.java
@@ -1092,7 +1092,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
if (attrib == null) {
attrib = CacheAttribute.UNKNOWN;
}
- attributeName = attrib.getGcL10n(enabled);
+ attributeName = attrib.getL10n(enabled);
if (buffer.length() > 0) {
buffer.append('\n');
}
diff --git a/main/src/cgeo/geocaching/enumerations/CacheAttribute.java b/main/src/cgeo/geocaching/enumerations/CacheAttribute.java
index 48b2c63..530869f 100644
--- a/main/src/cgeo/geocaching/enumerations/CacheAttribute.java
+++ b/main/src/cgeo/geocaching/enumerations/CacheAttribute.java
@@ -5,6 +5,8 @@ import cgeo.geocaching.cgeoapplication;
import org.apache.commons.lang3.StringUtils;
+import android.util.SparseArray;
+
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
@@ -131,7 +133,14 @@ public enum CacheAttribute {
this.stringIdNo = stringIdNo;
}
- public String getGcL10n(final boolean enabled) {
+ /**
+ * get localized text
+ *
+ * @param enabled
+ * true: for positive text, false: for negative text
+ * @return the localized text
+ */
+ public String getL10n(final boolean enabled) {
return cgeoapplication.getInstance().getResources().getString(
enabled ? stringIdYes : stringIdNo);
}
@@ -145,26 +154,22 @@ public enum CacheAttribute {
FIND_BY_GCRAWNAME = Collections.unmodifiableMap(mapGcRawNames);
}
- private final static Map<Integer, CacheAttribute> FIND_BY_GCID;
+ private final static SparseArray<CacheAttribute> FIND_BY_GCID = new SparseArray<CacheAttribute>();
static {
- final HashMap<Integer, CacheAttribute> mapGcIds = new HashMap<Integer, CacheAttribute>();
for (CacheAttribute attr : values()) {
if (attr.gcid != NO_ID) {
- mapGcIds.put(attr.gcid, attr);
+ FIND_BY_GCID.put(attr.gcid, attr);
}
}
- FIND_BY_GCID = Collections.unmodifiableMap(mapGcIds);
}
- private final static Map<Integer, CacheAttribute> FIND_BY_OCID;
+ private final static SparseArray<CacheAttribute> FIND_BY_OCID = new SparseArray<CacheAttribute>();
static {
- final HashMap<Integer, CacheAttribute> mapOcIds = new HashMap<Integer, CacheAttribute>();
for (CacheAttribute attr : values()) {
if (attr.ocid != NO_ID) {
- mapOcIds.put(attr.ocid, attr);
+ FIND_BY_OCID.put(attr.ocid, attr);
}
}
- FIND_BY_OCID = Collections.unmodifiableMap(mapOcIds);
}
public static CacheAttribute getByRawName(final String rawName) {
diff --git a/main/src/cgeo/geocaching/export/GpxExport.java b/main/src/cgeo/geocaching/export/GpxExport.java
index 05bea5a..d130e1f 100644
--- a/main/src/cgeo/geocaching/export/GpxExport.java
+++ b/main/src/cgeo/geocaching/export/GpxExport.java
@@ -331,7 +331,7 @@ class GpxExport extends AbstractExport {
gpx.startTag(PREFIX_GROUNDSPEAK, "attribute");
gpx.attribute("", "id", Integer.toString(attr.gcid));
gpx.attribute("", "inc", enabled ? "1" : "0");
- gpx.text(attr.getGcL10n(enabled));
+ gpx.text(attr.getL10n(enabled));
gpx.endTag(PREFIX_GROUNDSPEAK, "attribute");
}