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
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
@@ -366,6 +366,14 @@
}
@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) {
if (commitDefault()) {