commit | 83e7e63a8c482a6969cd62ba5b33a6700c87efcd | [log] [tgz] |
---|---|---|
author | Wenyi Wang <wenyiw@google.com> | Thu Nov 12 19:39:29 2015 -0800 |
committer | Wenyi Wang <wenyiw@google.com> | Fri Nov 13 11:42:41 2015 -0800 |
tree | a1547d3d5cfdad2cce0791895283d6c93d0d17d2 | |
parent | 46cc08778a304c4dfc74443227feee274a80eefd [diff] |
Show delete button only when text is not empty Bug: 25431751 Change-Id: I3daaaf9f1dc5353ebb799060d0ff568350db0a60
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() {