summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis Vidal <lvidal@cyngn.com>2016-02-16 10:16:43 -0800
committerLuis Vidal <lvidal@cyngn.com>2016-02-16 10:16:43 -0800
commitc1a5a2da8cb6c91ba3bdb971170d4d9d4c801bd4 (patch)
tree19fe6d188a62869f603f66e0706c67974c6e7478
parent6a2a6f522ea6674e94d3b166b9af7f85e5a12098 (diff)
downloadpackages_apps_ThemeChooser-c1a5a2da8cb6c91ba3bdb971170d4d9d4c801bd4.tar.gz
packages_apps_ThemeChooser-c1a5a2da8cb6c91ba3bdb971170d4d9d4c801bd4.tar.bz2
packages_apps_ThemeChooser-c1a5a2da8cb6c91ba3bdb971170d4d9d4c801bd4.zip
Fix Lock Screen card scroll animation
The lock screen card is being pushed to the top of the screen during the scroll animation and then slid down (to make sure the whole card is visible) if the device has hardware buttons. This patch will make sure the UX is the same across all devices. The card will be positioned in the middle of the screen once the animation is complete. Change-Id: Ic24c638dfa90f5f58424bc931eb5235befd31880 TICKET: CHOOSER-114
-rw-r--r--src/com/cyngn/theme/chooser/ThemeFragment.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/cyngn/theme/chooser/ThemeFragment.java b/src/com/cyngn/theme/chooser/ThemeFragment.java
index 6812c43..04e70b4 100644
--- a/src/com/cyngn/theme/chooser/ThemeFragment.java
+++ b/src/com/cyngn/theme/chooser/ThemeFragment.java
@@ -2875,8 +2875,10 @@ public class ThemeFragment extends Fragment implements LoaderManager.LoaderCallb
mHandler.postDelayed(new Runnable() {
@Override
public void run() {
- final ValueAnimator scrollAnimator =
- ValueAnimator.ofInt(0, mStyleCard.getBottom());
+ final int scrollToY = mStatusBarCard.getMeasuredHeight()
+ + mFontCard.getMeasuredHeight() + mIconCard.getMeasuredHeight()
+ + mNavBarCard.getMeasuredHeight() + mWallpaperCard.getMeasuredHeight() / 2;
+ final ValueAnimator scrollAnimator = ValueAnimator.ofInt(0, scrollToY);
scrollAnimator.setDuration(LOCK_SCREEN_CARD_SCROLL_ANIMATION_DURATION);
scrollAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override