From bf7a95e47facece917e99f19848c014c1438cd77 Mon Sep 17 00:00:00 2001 From: Tyler Gunn Date: Tue, 12 Aug 2014 12:16:28 -0700 Subject: Correcting dialpad animations in landscape (3/3). 1. Fixed slide in/out animations for RTL locales. Bug: 16463723 Change-Id: Ifb32e8daed58949d53acc23828d083f1adac3944 --- src/com/android/dialer/DialtactsActivity.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/com/android/dialer/DialtactsActivity.java') diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java index cb01e8ef0..5a76ffa74 100644 --- a/src/com/android/dialer/DialtactsActivity.java +++ b/src/com/android/dialer/DialtactsActivity.java @@ -414,10 +414,16 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O mActionBarController.restoreInstanceState(savedInstanceState); } - mSlideIn = AnimationUtils.loadAnimation(this, - mIsLandscape ? R.anim.dialpad_slide_in_right : R.anim.dialpad_slide_in_bottom); - mSlideOut = AnimationUtils.loadAnimation(this, - mIsLandscape ? R.anim.dialpad_slide_out_right : R.anim.dialpad_slide_out_bottom); + final boolean isLayoutRtl = DialerUtils.isRtl(); + if (mIsLandscape) { + mSlideIn = AnimationUtils.loadAnimation(this, + isLayoutRtl ? R.anim.dialpad_slide_in_left : R.anim.dialpad_slide_in_right); + mSlideOut = AnimationUtils.loadAnimation(this, + isLayoutRtl ? R.anim.dialpad_slide_out_left : R.anim.dialpad_slide_out_right); + } else { + mSlideIn = AnimationUtils.loadAnimation(this, R.anim.dialpad_slide_in_bottom); + mSlideOut = AnimationUtils.loadAnimation(this, R.anim.dialpad_slide_out_bottom); + } mSlideIn.setInterpolator(AnimUtils.EASE_IN); mSlideOut.setInterpolator(AnimUtils.EASE_OUT); -- cgit v1.2.3