From 494bec8daac55c76707e140c71fb8783fb3a9323 Mon Sep 17 00:00:00 2001 From: Kevin Lin Date: Tue, 2 Dec 2014 15:37:57 -0800 Subject: Override setDropDownAnchor in RecipientEditTextView to update its cached anchor view if clients use setDropDownAnchor instead of declaring the anchor in the xml file. Change-Id: Ibd3127768c903be3645b02584bfe49090cf2520e --- src/com/android/ex/chips/RecipientEditTextView.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/com/android/ex/chips/RecipientEditTextView.java b/src/com/android/ex/chips/RecipientEditTextView.java index ef0077e..7604b11 100644 --- a/src/com/android/ex/chips/RecipientEditTextView.java +++ b/src/com/android/ex/chips/RecipientEditTextView.java @@ -365,6 +365,14 @@ public class RecipientEditTextView extends MultiAutoCompleteTextView implements } } + @Override + public void setDropDownAnchor(int anchorId) { + super.setDropDownAnchor(anchorId); + if (anchorId != View.NO_ID) { + mDropdownAnchor = getRootView().findViewById(anchorId); + } + } + @Override public boolean onEditorAction(TextView view, int action, KeyEvent keyEvent) { if (action == EditorInfo.IME_ACTION_DONE) { -- cgit v1.2.3