Merge "Show delete button only when text is not empty" into ub-contactsdialer-a-dev am: df864c7808
am: c3e1e75bca
* commit 'c3e1e75bcad5df47a96af965e20ae76b5a58f200':
Show delete button only when text is not empty
diff --git a/src/com/android/contacts/editor/TextFieldsEditorView.java b/src/com/android/contacts/editor/TextFieldsEditorView.java
index 8a6141d..98b46ef 100644
--- a/src/com/android/contacts/editor/TextFieldsEditorView.java
+++ b/src/com/android/contacts/editor/TextFieldsEditorView.java
@@ -260,8 +260,8 @@
fieldView.setText(value);
}
- // Show the delete button if we have a non-null value
- setDeleteButtonVisible(value != null);
+ // Show the delete button if we have a non-empty value
+ setDeleteButtonVisible(!TextUtils.isEmpty(value));
// Prepare listener for writing changes
fieldView.addTextChangedListener(new TextWatcher() {