diff options
author | Jin Cao <jinyan@google.com> | 2014-08-21 02:57:50 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-08-21 02:57:50 +0000 |
commit | eaa20b5c0a0f732f61bca2fe3f56618ccf46fdd9 (patch) | |
tree | c3c228caf40cde2eed3553e21a101c75397e9345 | |
parent | 3514e7b0fa49804903af46eb99e93e3debaa64d3 (diff) | |
parent | 4d0425d48a54b684d7c1af824b14b3bdf0cfa4ce (diff) | |
download | chips-eaa20b5c0a0f732f61bca2fe3f56618ccf46fdd9.tar.gz |
am 4d0425d4: Merge "Ensure delete listener is set for chips" into ub-chips-cranbrook
* commit '4d0425d48a54b684d7c1af824b14b3bdf0cfa4ce':
Ensure delete listener is set for chips
-rw-r--r-- | src/com/android/ex/chips/DropdownChipLayouter.java | 6 | ||||
-rw-r--r-- | src/com/android/ex/chips/RecipientEditTextView.java | 4 |
2 files changed, 2 insertions, 8 deletions
diff --git a/src/com/android/ex/chips/DropdownChipLayouter.java b/src/com/android/ex/chips/DropdownChipLayouter.java index 6c9a694..f88ea7d 100644 --- a/src/com/android/ex/chips/DropdownChipLayouter.java +++ b/src/com/android/ex/chips/DropdownChipLayouter.java @@ -42,14 +42,8 @@ public class DropdownChipLayouter { private Query mQuery; public DropdownChipLayouter(LayoutInflater inflater, Context context) { - this(inflater, context, null); - } - - public DropdownChipLayouter(LayoutInflater inflater, Context context, - ChipDeleteListener deleteListener) { mInflater = inflater; mContext = context; - mDeleteListener = deleteListener; } public void setQuery(Query query) { diff --git a/src/com/android/ex/chips/RecipientEditTextView.java b/src/com/android/ex/chips/RecipientEditTextView.java index 6a892f3..aa330bd 100644 --- a/src/com/android/ex/chips/RecipientEditTextView.java +++ b/src/com/android/ex/chips/RecipientEditTextView.java @@ -331,8 +331,7 @@ public class RecipientEditTextView extends MultiAutoCompleteTextView implements mGestureDetector = new GestureDetector(context, this); setOnEditorActionListener(this); - setDropdownChipLayouter(new DropdownChipLayouter(LayoutInflater.from(context), context, - this)); + setDropdownChipLayouter(new DropdownChipLayouter(LayoutInflater.from(context), context)); } private int calculateTextHeight() { @@ -352,6 +351,7 @@ public class RecipientEditTextView extends MultiAutoCompleteTextView implements public void setDropdownChipLayouter(DropdownChipLayouter dropdownChipLayouter) { mDropdownChipLayouter = dropdownChipLayouter; + mDropdownChipLayouter.setDeleteListener(this); } public void setRecipientEntryItemClickedListener(RecipientEntryItemClickedListener listener) { |