aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/ui
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2015-02-17 19:30:03 +0100
committerBananeweizen <bananeweizen@gmx.de>2015-02-17 19:30:03 +0100
commite212c8a43ef6c0503837794b04f14362217a882f (patch)
tree13ca720107af064e6fee933254dfa87de3287969 /main/src/cgeo/geocaching/ui
parent0a47150668740f308fb53a0698ce401eb6ed79f1 (diff)
downloadcgeo-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.java6
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);