diff --git a/src/androidTest/java/de/blau/android/propertyeditor/PropertyEditorTest.java b/src/androidTest/java/de/blau/android/propertyeditor/PropertyEditorTest.java index 5ed4c00513..9557892944 100644 --- a/src/androidTest/java/de/blau/android/propertyeditor/PropertyEditorTest.java +++ b/src/androidTest/java/de/blau/android/propertyeditor/PropertyEditorTest.java @@ -322,7 +322,7 @@ public void nodeWithDirection1() { fail(); } assertNotNull(direction); - assertEquals("Type or tap for values", direction.getText()); + assertEquals(main.getString(R.string.tag_dialog_value_hint), direction.getText()); direction.clickAndWait(Until.newWindow(), 2000); TestUtils.clickText(device, true, main.getString(R.string.save), true, false); TestUtils.clickHome(device, true); @@ -371,12 +371,12 @@ public void nodeWithDirection2() { fail(); } assertNotNull(direction); - assertEquals("Type or tap for values", direction.getText()); + assertEquals(main.getString(R.string.tag_dialog_value_hint), direction.getText()); direction.clickAndWait(Until.newWindow(), 2000); TestUtils.clickText(device, true, "Forward", false, false); TestUtils.clickText(device, true, main.getString(R.string.save), true, false); TestUtils.clickHome(device, true); - assertEquals("forward", n.getTagWithKey("direction")); + assertEquals("forward", n.getTagWithKey("direction").toLowerCase()); } @Test @@ -410,7 +410,7 @@ public void nodeWithDirection3() { fail(); } assertNotNull(direction); - assertEquals("forward", direction.getText()); + assertEquals("forward", direction.getText().toLowerCase()); direction.clickAndWait(Until.newWindow(), 2000); TestUtils.clickText(device, true, "Forward", false, false); TestUtils.clickText(device, true, main.getString(R.string.save), true, false); diff --git a/src/main/java/de/blau/android/propertyeditor/tagform/ValueWidgetRow.java b/src/main/java/de/blau/android/propertyeditor/tagform/ValueWidgetRow.java index 023eeeee16..a5bfd7eb10 100644 --- a/src/main/java/de/blau/android/propertyeditor/tagform/ValueWidgetRow.java +++ b/src/main/java/de/blau/android/propertyeditor/tagform/ValueWidgetRow.java @@ -7,12 +7,9 @@ import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; -import android.widget.ArrayAdapter; import android.widget.LinearLayout; -import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; -import androidx.appcompat.app.AlertDialog; import de.blau.android.R; import de.blau.android.presets.PresetComboField; import de.blau.android.presets.PresetItem; @@ -20,9 +17,6 @@ import de.blau.android.presets.ValueType; import de.blau.android.propertyeditor.TagChanged; import de.blau.android.util.StringWithDescription; -import de.blau.android.util.StringWithDescriptionAndIcon; -import de.blau.android.util.Value; -import de.blau.android.views.CustomAutoCompleteTextView; public class ValueWidgetRow extends DialogRow implements TagChanged { @@ -66,11 +60,11 @@ static ValueWidgetRow getRow(@NonNull final TagFormFragment caller, @NonNull fin final Map allTags) { final ValueWidgetRow row = (ValueWidgetRow) inflater.inflate(R.layout.tag_form_value_widget_row, rowLayout, false); final String key = field.getKey(); - final String hint = preset != null ? field.getHint() : key; + final String hint = field.getHint(); row.keyView.setText(hint); row.keyView.setTag(key); row.setPreset(preset); - row.valueType = preset != null ? preset.getValueType(key) : null; + row.valueType = preset.getValueType(key); row.field = field; row.valueView.setHint(R.string.tag_dialog_value_hint);