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. :)
This commit is contained in:
parent
6f3b47704c
commit
8283ccff7c
|
@ -172,6 +172,9 @@ public class Search extends LinearLayout
|
|||
mAppSearchData = appSearchData;
|
||||
mGlobalSearch = globalSearch;
|
||||
|
||||
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
|
||||
|
@ -187,9 +190,6 @@ public class Search extends LinearLayout
|
|||
inputManager.showSoftInputUnchecked(0, null);
|
||||
}
|
||||
|
||||
if (isAtTop()) {
|
||||
showSearchDialog();
|
||||
} else {
|
||||
// Start the animation, unless it has already started.
|
||||
if (getAnimation() != mMorphAnimation) {
|
||||
mMorphAnimation.setDuration(getAnimationDuration());
|
||||
|
|
Loading…
Reference in New Issue