diff options
| author | Romain Guy <romainguy@android.com> | 2010-01-27 13:53:55 -0800 |
|---|---|---|
| committer | Romain Guy <romainguy@android.com> | 2010-01-27 15:53:40 -0800 |
| commit | 43c9cdffb619f93d9d4525dffd05701dc9c8c4bf (patch) | |
| tree | a266084c0bb0dd8bb2940361dd48679fe447c53c /core/java/android/widget/AutoCompleteTextView.java | |
| parent | 507354e4ba07e1d8701d747d60414b053eb517b4 (diff) | |
New View.dispatchDisplayHint() API.
Bug #2399147
This new API will be used by scrollable containers to tell children that they
are/are not displayed. This will allow lists to hide their filter popup window
for instance.
Diffstat (limited to 'core/java/android/widget/AutoCompleteTextView.java')
| -rw-r--r-- | core/java/android/widget/AutoCompleteTextView.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/java/android/widget/AutoCompleteTextView.java b/core/java/android/widget/AutoCompleteTextView.java index d53a4426683a..0f47b96e715d 100644 --- a/core/java/android/widget/AutoCompleteTextView.java +++ b/core/java/android/widget/AutoCompleteTextView.java @@ -1033,6 +1033,18 @@ public class AutoCompleteTextView extends EditText implements Filter.FilterListe } @Override + protected void onDisplayHint(int hint) { + super.onDisplayHint(hint); + switch (hint) { + case INVISIBLE: + if (!mDropDownAlwaysVisible) { + dismissDropDown(); + } + break; + } + } + + @Override protected void onFocusChanged(boolean focused, int direction, Rect previouslyFocusedRect) { super.onFocusChanged(focused, direction, previouslyFocusedRect); // Perform validation if the view is losing focus. |
