diff --git a/android_app/app/src/main/java/com/health/openscale/gui/preferences/MeasurementPreferences.java b/android_app/app/src/main/java/com/health/openscale/gui/preferences/MeasurementPreferences.java index 44e65ecd..6b815249 100644 --- a/android_app/app/src/main/java/com/health/openscale/gui/preferences/MeasurementPreferences.java +++ b/android_app/app/src/main/java/com/health/openscale/gui/preferences/MeasurementPreferences.java @@ -330,7 +330,7 @@ public class MeasurementPreferences extends PreferenceFragment implements Shared parentGroup = parent; measurement = measurementView; setIcon(measurement.getIcon()); - setTitle(measurement.getNameText()); + setTitle(measurement.getName()); } public PreferenceGroup getParent() { 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 8332aef6..6e0f2724 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 @@ -271,7 +271,8 @@ public abstract class FloatMeasurementView extends MeasurementView { return value; } - public String getName() { + @Override + public CharSequence getName() { return nameText; } 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 9989d489..133064e4 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,7 +247,7 @@ public abstract class MeasurementView extends TableLayout { public abstract void updatePreferences(SharedPreferences preferences); - public CharSequence getNameText() { return nameView.getText(); } + public CharSequence getName() { return nameView.getText(); } public abstract String getValueAsString(); public void appendDiffValue(SpannableStringBuilder builder) { } public Drawable getIcon() { return iconView.getDrawable(); } @@ -379,7 +379,7 @@ public abstract class MeasurementView extends TableLayout { protected AlertDialog getInputDialog() { AlertDialog.Builder builder = new AlertDialog.Builder(getContext()); - builder.setTitle(getNameText()); + builder.setTitle(getName()); builder.setIcon(getIcon()); final EditText input = new EditText(getContext());