diff options
| author | koem <spam@petoria.de> | 2013-02-12 04:04:13 -0800 |
|---|---|---|
| committer | koem <spam@petoria.de> | 2013-02-12 04:04:13 -0800 |
| commit | 7b4a0b337a5f22bf0058c22967da94faea9ce318 (patch) | |
| tree | a9991f02c99d417e2517f8831c6505e385ee8459 /main/src/cgeo/geocaching/CacheDetailActivity.java | |
| parent | 70251c24f5fafeeb150a2142249245e9515f560b (diff) | |
| parent | 3c3b9bb7f748bd43126e39a83268d23056db6ca6 (diff) | |
| download | cgeo-7b4a0b337a5f22bf0058c22967da94faea9ce318.zip cgeo-7b4a0b337a5f22bf0058c22967da94faea9ce318.tar.gz cgeo-7b4a0b337a5f22bf0058c22967da94faea9ce318.tar.bz2 | |
Merge pull request #2465 from koem/oc_icons
Icons for OC
Diffstat (limited to 'main/src/cgeo/geocaching/CacheDetailActivity.java')
| -rw-r--r-- | main/src/cgeo/geocaching/CacheDetailActivity.java | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/main/src/cgeo/geocaching/CacheDetailActivity.java b/main/src/cgeo/geocaching/CacheDetailActivity.java index 03c0bcf..a3535a6 100644 --- a/main/src/cgeo/geocaching/CacheDetailActivity.java +++ b/main/src/cgeo/geocaching/CacheDetailActivity.java @@ -1046,8 +1046,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); @@ -1061,7 +1061,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); } @@ -1088,10 +1088,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'); } |
