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

Merge getNameText() into getName()

This commit is contained in:
Erik Johansson
2018-02-22 19:27:36 +01:00
parent f0940e7dee
commit f3c5d2fd75
3 changed files with 5 additions and 4 deletions

View File

@@ -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() {

View File

@@ -271,7 +271,8 @@ public abstract class FloatMeasurementView extends MeasurementView {
return value;
}
public String getName() {
@Override
public CharSequence getName() {
return nameText;
}

View File

@@ -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());