summaryrefslogtreecommitdiffstats
path: root/src/com/android
diff options
context:
space:
mode:
authorMike LeBeau <mlebeau@android.com>2009-05-22 18:08:43 -0700
committerMike LeBeau <mlebeau@android.com>2009-05-22 18:08:43 -0700
commit8283ccff7c44e3f2a62496167159228eb50706b6 (patch)
tree625912418e6fd344e76e88067a8488b93aaceb5a /src/com/android
parent6f3b47704c9e1f655df8ed5dcf4531745392b2d7 (diff)
downloadandroid_packages_apps_Trebuchet-8283ccff7c44e3f2a62496167159228eb50706b6.tar.gz
android_packages_apps_Trebuchet-8283ccff7c44e3f2a62496167159228eb50706b6.tar.bz2
android_packages_apps_Trebuchet-8283ccff7c44e3f2a62496167159228eb50706b6.zip
Do not force the soft keyboard open if the search widget is already at the top of the screen.
Forcing the soft keyboard open is done at a specific time when animating the search widget to the top of the screen in order to time the two animations well, but we were doing it anyway even if the search widget was already at the top of the screen and didn't need to animate. Okay, so git does kinda rock when you're on a plane. :)
Diffstat (limited to 'src/com/android')
-rw-r--r--src/com/android/launcher/Search.java30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/com/android/launcher/Search.java b/src/com/android/launcher/Search.java
index 3d0947987..96c0022b0 100644
--- a/src/com/android/launcher/Search.java
+++ b/src/com/android/launcher/Search.java
@@ -172,24 +172,24 @@ public class Search extends LinearLayout
mAppSearchData = appSearchData;
mGlobalSearch = globalSearch;
- // Call up the keyboard before we actually call the search dialog so that it
- // (hopefully) animates in at about the same time as the widget animation, and
- // so that it becomes available as soon as possible. Only do this if a hard
- // keyboard is not currently available.
- if (getContext().getResources().getConfiguration().hardKeyboardHidden ==
- Configuration.HARDKEYBOARDHIDDEN_YES) {
- // Make sure the text field is not focusable, so it's not responsible for
- // causing the whole view to shift up to accommodate the keyboard.
- mSearchText.setFocusable(false);
-
- InputMethodManager inputManager = (InputMethodManager)
- getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
- inputManager.showSoftInputUnchecked(0, null);
- }
-
if (isAtTop()) {
showSearchDialog();
} else {
+ // Call up the keyboard before we actually call the search dialog so that it
+ // (hopefully) animates in at about the same time as the widget animation, and
+ // so that it becomes available as soon as possible. Only do this if a hard
+ // keyboard is not currently available.
+ if (getContext().getResources().getConfiguration().hardKeyboardHidden ==
+ Configuration.HARDKEYBOARDHIDDEN_YES) {
+ // Make sure the text field is not focusable, so it's not responsible for
+ // causing the whole view to shift up to accommodate the keyboard.
+ mSearchText.setFocusable(false);
+
+ InputMethodManager inputManager = (InputMethodManager)
+ getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
+ inputManager.showSoftInputUnchecked(0, null);
+ }
+
// Start the animation, unless it has already started.
if (getAnimation() != mMorphAnimation) {
mMorphAnimation.setDuration(getAnimationDuration());