From 9d9611ac72bf45b59351c2e91e2fe817011a8ef7 Mon Sep 17 00:00:00 2001 From: Erik Johansson Date: Thu, 8 Feb 2018 21:46:21 +0100 Subject: [PATCH] Add new line in appendDiffValue so that it's only added when needed (i.e. when there are a diff value). --- .../java/com/health/openscale/gui/fragments/TableFragment.java | 1 - .../com/health/openscale/gui/views/FloatMeasurementView.java | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/android_app/app/src/main/java/com/health/openscale/gui/fragments/TableFragment.java b/android_app/app/src/main/java/com/health/openscale/gui/fragments/TableFragment.java index 8695693f..630a9797 100644 --- a/android_app/app/src/main/java/com/health/openscale/gui/fragments/TableFragment.java +++ b/android_app/app/src/main/java/com/health/openscale/gui/fragments/TableFragment.java @@ -494,7 +494,6 @@ public class TableFragment extends Fragment implements FragmentUpdateListener { SpannableStringBuilder string = new SpannableStringBuilder(); string.append(visibleMeasurements.get(i).getValueAsString()); - string.append("\n"); visibleMeasurements.get(i).appendDiffValue(string); stringCache[position][i] = string; diff --git a/android_app/app/src/main/java/com/health/openscale/gui/views/FloatMeasurementView.java b/android_app/app/src/main/java/com/health/openscale/gui/views/FloatMeasurementView.java index b0ec0bfa..166ea1a3 100644 --- a/android_app/app/src/main/java/com/health/openscale/gui/views/FloatMeasurementView.java +++ b/android_app/app/src/main/java/com/health/openscale/gui/views/FloatMeasurementView.java @@ -286,6 +286,7 @@ public abstract class FloatMeasurementView extends MeasurementView { color = Color.GRAY; } + text.append('\n'); int start = text.length(); text.append(symbol); text.setSpan(new ForegroundColorSpan(color), start, text.length(),