summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSai Cheemalapati <saicheems@google.com>2014-06-04 09:37:21 -0700
committerSai Cheemalapati <saicheems@google.com>2014-06-04 09:54:48 -0700
commit64d674bb389d89f9d94c75f2b7cab705961d5c2d (patch)
tree4282632c2e18c972355a9d00271e9b6fc1db2342 /src
parent9da8fb46fa21159321295119e1b2075747cfbbf9 (diff)
Fix SearchFragment translation after orientation change.
Small edit to Andrew's CL 477577 - fixes the translation of the ListView after switching to landscape when the Dialpad is open and the ActionBar is up. Change-Id: I8ef00e65aa37a15d5ce5c987de18311fe5320e46
Diffstat (limited to 'src')
-rw-r--r--src/com/android/dialer/list/SearchFragment.java9
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 ;