diff options
author | Andrew Lee <anwlee@google.com> | 2014-05-06 15:33:35 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2014-05-06 18:09:12 -0700 |
commit | cdfa6c66fa29ee0de675cd77b3bc72f6fba5ef0c (patch) | |
tree | 8e1b530b04bf60b7c85bdf42b011336528e90544 /src/com/android/dialer/dialpad/DialpadFragment.java | |
parent | 3d3ff68ffb5f0f30e03d4456892cf3e1912e39d4 (diff) |
Modify the calls in Dialer to animate the dialpad in.
Bug: 14471388
Change-Id: I7b8b59ffd49f3e5512798cd6d9e86f2f9d0417d6
Diffstat (limited to 'src/com/android/dialer/dialpad/DialpadFragment.java')
-rw-r--r-- | src/com/android/dialer/dialpad/DialpadFragment.java | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/com/android/dialer/dialpad/DialpadFragment.java b/src/com/android/dialer/dialpad/DialpadFragment.java index 5b86c739e..245629474 100644 --- a/src/com/android/dialer/dialpad/DialpadFragment.java +++ b/src/com/android/dialer/dialpad/DialpadFragment.java @@ -260,7 +260,7 @@ public class DialpadFragment extends Fragment private boolean mStartedFromNewIntent = false; private boolean mFirstLaunch = false; - private boolean mAdjustTranslationForAnimation = false; + private boolean mAnimate = false; private static final String PREF_DIGITS_FILLED_BY_INTENT = "pref_digits_filled_by_intent"; @@ -358,7 +358,7 @@ public class DialpadFragment extends Fragment public boolean onPreDraw() { if (isHidden()) return true; - if (mAdjustTranslationForAnimation && fragmentView.getTranslationY() == 0) { + if (mAnimate && fragmentView.getTranslationY() == 0) { ((DialpadSlidingLinearLayout) fragmentView).setYFraction( DIALPAD_SLIDE_FRACTION); } @@ -567,8 +567,9 @@ public class DialpadFragment extends Fragment } private void configureKeypadListeners(View fragmentView) { - final int[] buttonIds = new int[] {R.id.zero, R.id.one, R.id.two, R.id.three, R.id.four, - R.id.five, R.id.six, R.id.seven, R.id.eight, R.id.nine, R.id.star, R.id.pound}; + final int[] buttonIds = new int[] {R.id.one, R.id.two, R.id.three, R.id.four, R.id.five, + R.id.six, R.id.seven, R.id.eight, R.id.nine, R.id.star, R.id.zero, R.id.pound}; + DialpadKeyButton dialpadKey; for (int i = 0; i < buttonIds.length; i++) { @@ -1611,13 +1612,17 @@ public class DialpadFragment extends Fragment if (hidden) { activity.onDialpadHidden(); } else { + if (mAnimate) { + DialpadView dialpadView = (DialpadView) getView().findViewById(R.id.dialpad_view); + dialpadView.animateShow(); + } activity.onDialpadShown(); mDigits.requestFocus(); } } - public void setAdjustTranslationForAnimation(boolean value) { - mAdjustTranslationForAnimation = value; + public void setAnimate(boolean value) { + mAnimate = value; } public void setYFraction(float yFraction) { |