From c30c804c2c50191cfb0eac2f561d756b88528d56 Mon Sep 17 00:00:00 2001 From: Erik Johansson Date: Thu, 22 Feb 2018 15:42:03 +0100 Subject: [PATCH] Add MeasurementView.getNameText --- .../java/com/health/openscale/gui/views/MeasurementView.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/android_app/app/src/main/java/com/health/openscale/gui/views/MeasurementView.java b/android_app/app/src/main/java/com/health/openscale/gui/views/MeasurementView.java index 3e297de4..9989d489 100644 --- a/android_app/app/src/main/java/com/health/openscale/gui/views/MeasurementView.java +++ b/android_app/app/src/main/java/com/health/openscale/gui/views/MeasurementView.java @@ -247,6 +247,7 @@ public abstract class MeasurementView extends TableLayout { public abstract void updatePreferences(SharedPreferences preferences); + public CharSequence getNameText() { return nameView.getText(); } public abstract String getValueAsString(); public void appendDiffValue(SpannableStringBuilder builder) { } public Drawable getIcon() { return iconView.getDrawable(); } @@ -378,8 +379,8 @@ public abstract class MeasurementView extends TableLayout { protected AlertDialog getInputDialog() { AlertDialog.Builder builder = new AlertDialog.Builder(getContext()); - builder.setTitle(nameView.getText()); - builder.setIcon(iconView.getDrawable()); + builder.setTitle(getNameText()); + builder.setIcon(getIcon()); final EditText input = new EditText(getContext());