1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-08-30 03:30:30 +02:00

Add MeasurementView.getNameText

This commit is contained in:
Erik Johansson
2018-02-22 15:42:03 +01:00
parent 660b017741
commit c30c804c2c

View File

@@ -247,6 +247,7 @@ public abstract class MeasurementView extends TableLayout {
public abstract void updatePreferences(SharedPreferences preferences); public abstract void updatePreferences(SharedPreferences preferences);
public CharSequence getNameText() { return nameView.getText(); }
public abstract String getValueAsString(); public abstract String getValueAsString();
public void appendDiffValue(SpannableStringBuilder builder) { } public void appendDiffValue(SpannableStringBuilder builder) { }
public Drawable getIcon() { return iconView.getDrawable(); } public Drawable getIcon() { return iconView.getDrawable(); }
@@ -378,8 +379,8 @@ public abstract class MeasurementView extends TableLayout {
protected AlertDialog getInputDialog() { protected AlertDialog getInputDialog() {
AlertDialog.Builder builder = new AlertDialog.Builder(getContext()); AlertDialog.Builder builder = new AlertDialog.Builder(getContext());
builder.setTitle(nameView.getText()); builder.setTitle(getNameText());
builder.setIcon(iconView.getDrawable()); builder.setIcon(getIcon());
final EditText input = new EditText(getContext()); final EditText input = new EditText(getContext());