summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Lin <linkevin@google.com>2014-12-02 15:37:57 -0800
committerKevin Lin <linkevin@google.com>2014-12-02 15:41:18 -0800
commit494bec8daac55c76707e140c71fb8783fb3a9323 (patch)
tree4fb39771d06c1d1b7b4dab4935cf0291def72a06
parent18eefa523611ccd2165e6d79621f50ed038bb45d (diff)
downloadandroid_frameworks_opt_chips-494bec8daac55c76707e140c71fb8783fb3a9323.tar.gz
android_frameworks_opt_chips-494bec8daac55c76707e140c71fb8783fb3a9323.tar.bz2
android_frameworks_opt_chips-494bec8daac55c76707e140c71fb8783fb3a9323.zip
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
-rw-r--r--src/com/android/ex/chips/RecipientEditTextView.java8
1 files changed, 8 insertions, 0 deletions
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 @@ 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) {
if (commitDefault()) {