diff options
| author | Alan Viverette <alanv@google.com> | 2014-11-13 12:59:37 -0800 |
|---|---|---|
| committer | Alan Viverette <alanv@google.com> | 2014-11-13 12:59:37 -0800 |
| commit | df68999dc7de3893ca80e4c736704dcc9ed94e35 (patch) | |
| tree | cfdbab8a9921c8a6bc685b0ffa9fbc62aef27443 /core/java/android/widget/AutoCompleteTextView.java | |
| parent | 136f54153e412485feae39cf3fe86392f01a2bd6 (diff) | |
Don't dismiss AutoCompleteTextView on focus change while temp detached
This is consistent with how TextView handles focus changes while
temporarily detached and prevents the suggestion popup from being
dismissed during layout when the AutoCompleteTextView is used
within a ListView.
BUG: 18364277
Change-Id: I8ca6fb9dba63b49a84a60a606bc441446c083cee
Diffstat (limited to 'core/java/android/widget/AutoCompleteTextView.java')
| -rw-r--r-- | core/java/android/widget/AutoCompleteTextView.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/java/android/widget/AutoCompleteTextView.java b/core/java/android/widget/AutoCompleteTextView.java index 3b16aba010e0..e6392b9d3a75 100644 --- a/core/java/android/widget/AutoCompleteTextView.java +++ b/core/java/android/widget/AutoCompleteTextView.java @@ -1005,6 +1005,12 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe @Override protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) { super.onFocusChanged(focused, direction, previouslyFocusedRect); + + if (mTemporaryDetach) { + // If we are temporarily in the detach state, then do nothing. + return; + } + // Perform validation if the view is losing focus. if (!focused) { performValidation(); |
