diff options
author | Vinod Krishnan <vinodkrishnan@google.com> | 2015-09-22 12:11:06 -0700 |
---|---|---|
committer | Vinod Krishnan <vinodkrishnan@google.com> | 2015-09-22 16:25:42 -0700 |
commit | 639283b4daf70b60e721d81a3404da7338cc6a41 (patch) | |
tree | f6f737029fdaf0ec62e5d056c09b12f60f5b3dd4 /src/com | |
parent | fb9be671c5293642b198c4ef06a94b33ff4ebc0b (diff) | |
download | android_packages_apps_PackageInstaller-639283b4daf70b60e721d81a3404da7338cc6a41.tar.gz android_packages_apps_PackageInstaller-639283b4daf70b60e721d81a3404da7338cc6a41.tar.bz2 android_packages_apps_PackageInstaller-639283b4daf70b60e721d81a3404da7338cc6a41.zip |
MNC Perms: Button bar animate to max half window height
- Make sure that the button bar only animates to half way (max).
- Also make the buttons scrollable
Bug: 24265941
Bug: 24208967
Change-Id: I68d01c72658c0e7aff35b899b638da123c44d62e
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/packageinstaller/permission/ui/wear/ConfirmationViewHandler.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/com/android/packageinstaller/permission/ui/wear/ConfirmationViewHandler.java b/src/com/android/packageinstaller/permission/ui/wear/ConfirmationViewHandler.java index d28866ef..b1ff52bc 100644 --- a/src/com/android/packageinstaller/permission/ui/wear/ConfirmationViewHandler.java +++ b/src/com/android/packageinstaller/permission/ui/wear/ConfirmationViewHandler.java @@ -182,8 +182,14 @@ public abstract class ConfirmationViewHandler implements if (mContent.getHeight() > mScrollingContainer.getHeight()) { mButtonBarContainer.setTranslationZ(mButtonBarFloatingHeight); mHideHandler.sendEmptyMessageDelayed(MSG_HIDE_BUTTON_BAR, 3000); - generateButtonBarAnimator(mButtonBarContainer.getHeight(), 0, 0, - mButtonBarFloatingHeight, 1000); + int maxButtonBarHeight = 0; + if (mButtonBarContainer.getHeight() >= mRoot.getHeight() / 2) { + // If the ButtonBar is bigger than half the screen, then don't + // animate all the way. + maxButtonBarHeight = mRoot.getHeight() / 2; + } + generateButtonBarAnimator(mButtonBarContainer.getHeight(), + maxButtonBarHeight, 0, mButtonBarFloatingHeight, 1000); } else { mButtonBarContainer.setTranslationY(0); mButtonBarContainer.setTranslationZ(0); @@ -282,4 +288,4 @@ public abstract class ConfirmationViewHandler implements mButtonBarAnimator.setInterpolator(mInterpolator); mButtonBarAnimator.start(); } -}
\ No newline at end of file +} |