diff options
| author | Bananeweizen <bananeweizen@gmx.de> | 2015-02-17 19:30:03 +0100 |
|---|---|---|
| committer | Bananeweizen <bananeweizen@gmx.de> | 2015-02-17 19:30:03 +0100 |
| commit | e212c8a43ef6c0503837794b04f14362217a882f (patch) | |
| tree | 13ca720107af064e6fee933254dfa87de3287969 /main/src/cgeo/geocaching/ui | |
| parent | 0a47150668740f308fb53a0698ce401eb6ed79f1 (diff) | |
| download | cgeo-e212c8a43ef6c0503837794b04f14362217a882f.zip cgeo-e212c8a43ef6c0503837794b04f14362217a882f.tar.gz cgeo-e212c8a43ef6c0503837794b04f14362217a882f.tar.bz2 | |
new: show number of trackables in cache list
Diffstat (limited to 'main/src/cgeo/geocaching/ui')
| -rw-r--r-- | main/src/cgeo/geocaching/ui/CacheListAdapter.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/ui/CacheListAdapter.java b/main/src/cgeo/geocaching/ui/CacheListAdapter.java index e2daf11..d9daa1d 100644 --- a/main/src/cgeo/geocaching/ui/CacheListAdapter.java +++ b/main/src/cgeo/geocaching/ui/CacheListAdapter.java @@ -112,7 +112,7 @@ public class CacheListAdapter extends ArrayAdapter<Geocache> { @InjectView(R.id.distance) protected DistanceView distance; @InjectView(R.id.favorite) protected TextView favorite; @InjectView(R.id.info) protected TextView info; - @InjectView(R.id.inventory) protected ImageView inventory; + @InjectView(R.id.inventory) protected TextView inventory; @InjectView(R.id.direction) protected CompassMiniView direction; @InjectView(R.id.dirimg) protected ImageView dirImg; public Geocache cache = null; @@ -433,7 +433,9 @@ public class CacheListAdapter extends ArrayAdapter<Geocache> { } holder.text.setCompoundDrawablesWithIntrinsicBounds(getCacheIcon(cache), null, null, null); - if (cache.getInventoryItems() > 0) { + final int inventorySize = cache.getInventoryItems(); + if (inventorySize > 0) { + holder.inventory.setText(Integer.toString(inventorySize)); holder.inventory.setVisibility(View.VISIBLE); } else { holder.inventory.setVisibility(View.GONE); |
