aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/CacheDetailActivity.java
diff options
context:
space:
mode:
authorkoem <koem@petoria.de>2013-02-13 01:07:35 +1300
committerkoem <koem@petoria.de>2013-02-13 01:07:35 +1300
commitbe8da094a918f63a977f9a0ee31e2cddee5af58d (patch)
tree734620dd334735bfe23d8a3a9cea166b6631f440 /main/src/cgeo/geocaching/CacheDetailActivity.java
parent6d450d980283b81e09fa774651c27ac77d229eb8 (diff)
parent7b4a0b337a5f22bf0058c22967da94faea9ce318 (diff)
downloadcgeo-be8da094a918f63a977f9a0ee31e2cddee5af58d.zip
cgeo-be8da094a918f63a977f9a0ee31e2cddee5af58d.tar.gz
cgeo-be8da094a918f63a977f9a0ee31e2cddee5af58d.tar.bz2
Merge branch 'master' into chooselist
Diffstat (limited to 'main/src/cgeo/geocaching/CacheDetailActivity.java')
-rw-r--r--main/src/cgeo/geocaching/CacheDetailActivity.java13
1 files changed, 7 insertions, 6 deletions
diff --git a/main/src/cgeo/geocaching/CacheDetailActivity.java b/main/src/cgeo/geocaching/CacheDetailActivity.java
index 33d89b3..3e95d72 100644
--- a/main/src/cgeo/geocaching/CacheDetailActivity.java
+++ b/main/src/cgeo/geocaching/CacheDetailActivity.java
@@ -1047,8 +1047,8 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
}
final boolean strikethru = !CacheAttribute.isEnabled(attributeName);
- final CacheAttribute attrib = CacheAttribute.getByGcRawName(CacheAttribute.trimAttributeName(attributeName));
- if (attrib != CacheAttribute.UNKNOWN) {
+ final CacheAttribute attrib = CacheAttribute.getByRawName(CacheAttribute.trimAttributeName(attributeName));
+ if (attrib != null) {
noAttributeIconsFound = false;
Drawable d = res.getDrawable(attrib.drawableId);
iv.setImageDrawable(d);
@@ -1062,7 +1062,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
fl.addView(strikethruImage);
}
} else {
- Drawable d = res.getDrawable(R.drawable.attribute_icon_not_found);
+ Drawable d = res.getDrawable(R.drawable.attribute_unknown);
iv.setImageDrawable(d);
}
@@ -1089,10 +1089,11 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
for (String attributeName : cache.getAttributes()) {
final boolean enabled = CacheAttribute.isEnabled(attributeName);
// search for a translation of the attribute
- CacheAttribute attrib = CacheAttribute.getByGcRawName(CacheAttribute.trimAttributeName(attributeName));
- if (attrib != CacheAttribute.UNKNOWN) {
- attributeName = attrib.getL10n(enabled);
+ CacheAttribute attrib = CacheAttribute.getByRawName(CacheAttribute.trimAttributeName(attributeName));
+ if (attrib == null) {
+ attrib = CacheAttribute.UNKNOWN;
}
+ attributeName = attrib.getL10n(enabled);
if (buffer.length() > 0) {
buffer.append('\n');
}