diff options
| author | Amith Yamasani <yamasani@google.com> | 2011-07-26 16:14:26 -0700 |
|---|---|---|
| committer | Amith Yamasani <yamasani@google.com> | 2011-07-26 18:15:08 -0700 |
| commit | 10da590839e264735de8a4582021aca0dab81037 (patch) | |
| tree | 62ed64e0f59a2b63c28febad26e7da5d228e826a /core/java/android/widget/SearchView.java | |
| parent | e3f5edf9755ca2ffbb654389251a61b35a3d9901 (diff) | |
Handle callbacks to CollapsibleActionViews that are in an actionLayout.
Also, the onActionViewCollapsed needs to be called before detaching
the action view, so that the action view can dismiss the keyboard properly.
Fixes the Gmail search case where the keyboard doesn't disappear on hitting
the "up" affordance after a search.
Change-Id: I3c2f3f90f0edf6473404e6ceae3fa08866cad736
Diffstat (limited to 'core/java/android/widget/SearchView.java')
| -rw-r--r-- | core/java/android/widget/SearchView.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/java/android/widget/SearchView.java b/core/java/android/widget/SearchView.java index 55b73dffb4a6..763a06473de4 100644 --- a/core/java/android/widget/SearchView.java +++ b/core/java/android/widget/SearchView.java @@ -330,9 +330,9 @@ public class SearchView extends LinearLayout implements CollapsibleActionView { @Override public void clearFocus() { mClearingFocus = true; + setImeVisibility(false); super.clearFocus(); mQueryTextView.clearFocus(); - setImeVisibility(false); mClearingFocus = false; } @@ -1041,8 +1041,9 @@ public class SearchView extends LinearLayout implements CollapsibleActionView { */ @Override public void onActionViewCollapsed() { + clearFocus(); + updateViewsVisibility(true); mQueryTextView.setText(""); - setIconified(true); mExpandedInActionView = false; } |
