diff options
-rw-r--r-- | src/com/android/dialer/list/SearchFragment.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/com/android/dialer/list/SearchFragment.java b/src/com/android/dialer/list/SearchFragment.java index 6abfcaa79..d9dc735d7 100644 --- a/src/com/android/dialer/list/SearchFragment.java +++ b/src/com/android/dialer/list/SearchFragment.java @@ -172,9 +172,12 @@ public class SearchFragment extends PhoneNumberPickerFragment { // Use negative shadow height instead of 0 to account for the 9-patch's shadow. int startTranslationValue = mActivity.isDialpadShown() ? mActionBarHeight - mShadowHeight: -mShadowHeight; - int endTranslationValue = - mActivity.isDialpadShown() ? -mShadowHeight : mActionBarHeight -mShadowHeight; - + int endTranslationValue = 0; + // Prevents ListView from being translated down after a rotation when the ActionBar is up. + if (animate || mActivity.isActionBarShowing()) { + endTranslationValue = + mActivity.isDialpadShown() ? 0 : mActionBarHeight -mShadowHeight; + } if (animate) { Interpolator interpolator = mActivity.isDialpadShown() ? AnimUtils.EASE_IN : AnimUtils.EASE_OUT ; |