diff options
| author | Bananeweizen <bananeweizen@gmx.de> | 2014-07-05 10:50:40 +0200 |
|---|---|---|
| committer | Bananeweizen <bananeweizen@gmx.de> | 2014-07-05 10:50:40 +0200 |
| commit | 5dd468a4204fad640332cb86db7ddd623555369f (patch) | |
| tree | f41ae1bd82ba6b7dc10ba3a200bba66bdb4d34f3 /main/src | |
| parent | 13cc788d0fa1b958b8cce427890ca89719a7f60d (diff) | |
| download | cgeo-5dd468a4204fad640332cb86db7ddd623555369f.zip cgeo-5dd468a4204fad640332cb86db7ddd623555369f.tar.gz cgeo-5dd468a4204fad640332cb86db7ddd623555369f.tar.bz2 | |
revert increased space in cache details
Diffstat (limited to 'main/src')
| -rw-r--r-- | main/src/cgeo/geocaching/ui/CacheDetailsCreator.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/ui/CacheDetailsCreator.java b/main/src/cgeo/geocaching/ui/CacheDetailsCreator.java index 6d44554..e4b5f54 100644 --- a/main/src/cgeo/geocaching/ui/CacheDetailsCreator.java +++ b/main/src/cgeo/geocaching/ui/CacheDetailsCreator.java @@ -11,6 +11,7 @@ import cgeo.geocaching.geopoint.Units; import org.apache.commons.lang3.StringUtils; import org.eclipse.jdt.annotation.NonNull; +import android.annotation.SuppressLint; import android.app.Activity; import android.content.res.Resources; import android.text.format.DateUtils; @@ -26,6 +27,9 @@ import java.util.ArrayList; import java.util.Date; import java.util.List; +// TODO The suppression of this lint finding is bad. But to fix it, someone needs to rework the layout of the cache +// details also, not just only change the code here. +@SuppressLint("InflateParams") public final class CacheDetailsCreator { private final Activity activity; private final ViewGroup parentView; @@ -45,7 +49,7 @@ public final class CacheDetailsCreator { * @return the view containing the displayed string (i.e. the right side one from the pair of "label": "value") */ public TextView add(final int nameId, final CharSequence value) { - final RelativeLayout layout = (RelativeLayout) activity.getLayoutInflater().inflate(R.layout.cache_information_item, parentView, false); + final RelativeLayout layout = (RelativeLayout) activity.getLayoutInflater().inflate(R.layout.cache_information_item, null, false); final TextView nameView = (TextView) layout.findViewById(R.id.name); nameView.setText(res.getString(nameId)); lastValueView = (TextView) layout.findViewById(R.id.value); @@ -63,7 +67,7 @@ public final class CacheDetailsCreator { } public RelativeLayout addStars(final int nameId, final float value, final int max) { - final RelativeLayout layout = (RelativeLayout) activity.getLayoutInflater().inflate(R.layout.cache_information_item, parentView, false); + final RelativeLayout layout = (RelativeLayout) activity.getLayoutInflater().inflate(R.layout.cache_information_item, null, false); final TextView nameView = (TextView) layout.findViewById(R.id.name); lastValueView = (TextView) layout.findViewById(R.id.value); final LinearLayout layoutStars = (LinearLayout) layout.findViewById(R.id.stars); |
