diff options
| author | koem <koem@petoria.de> | 2013-02-09 18:14:29 +1300 |
|---|---|---|
| committer | koem <koem@petoria.de> | 2013-02-11 08:16:24 +1300 |
| commit | 8bc22701fbef17c24de6f2f8af282da08eba5766 (patch) | |
| tree | 7f81de606dab7eb5dab6d20cac2af1c00b99ceba /main/src/cgeo/geocaching/CacheDetailActivity.java | |
| parent | 509cefa3af847129bf40cff15437183d950752a7 (diff) | |
| download | cgeo-8bc22701fbef17c24de6f2f8af282da08eba5766.zip cgeo-8bc22701fbef17c24de6f2f8af282da08eba5766.tar.gz cgeo-8bc22701fbef17c24de6f2f8af282da08eba5766.tar.bz2 | |
Icons for OC
- new icons for opencaching
- changed some icons because of copyright
- english strings for opencaching attributes
- german strings for opencaching attributes
- new script to show (missing) strings for attributes
- new script to edit svg files from thenounproject.com
- new script to generate enums
- ocicons.html: list of all OC icons
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..7921bc4 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.getGcL10n(enabled); if (buffer.length() > 0) { buffer.append('\n'); } |
