diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2015-04-24 15:20:43 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2015-04-24 15:28:20 -0700 |
commit | f7a29e83f06909b378dba39c83a522375682710a (patch) | |
tree | 8b42bc5a30c2e0c87a638048d29a9094366bf4ba /src/com/android/launcher3/LauncherStateTransitionAnimation.java | |
parent | e2df0620c13b9dc7e63224153b98fdbb48546f9b (diff) | |
download | android_packages_apps_Trebuchet-f7a29e83f06909b378dba39c83a522375682710a.tar.gz android_packages_apps_Trebuchet-f7a29e83f06909b378dba39c83a522375682710a.tar.bz2 android_packages_apps_Trebuchet-f7a29e83f06909b378dba39c83a522375682710a.zip |
Removing some unused method params from CellLayout
> Replacing various distance calculations with Math.hypot
> Moving findVacantCell to Utilities
Change-Id: I0cb194b603e52b3bb2b29a095bb4da2bb408ab13
Diffstat (limited to 'src/com/android/launcher3/LauncherStateTransitionAnimation.java')
-rw-r--r-- | src/com/android/launcher3/LauncherStateTransitionAnimation.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/launcher3/LauncherStateTransitionAnimation.java b/src/com/android/launcher3/LauncherStateTransitionAnimation.java index f91cfa07b..9e005f29a 100644 --- a/src/com/android/launcher3/LauncherStateTransitionAnimation.java +++ b/src/com/android/launcher3/LauncherStateTransitionAnimation.java @@ -258,7 +258,7 @@ public class LauncherStateTransitionAnimation { // Setup the reveal view animation int width = revealView.getMeasuredWidth(); int height = revealView.getMeasuredHeight(); - float revealRadius = (float) Math.sqrt((width * width) / 4 + (height * height) / 4); + float revealRadius = (float) Math.hypot(width / 2, height / 2); revealView.setVisibility(View.VISIBLE); revealView.setAlpha(0f); revealView.setTranslationY(0f); @@ -563,7 +563,7 @@ public class LauncherStateTransitionAnimation { if (fromView.getVisibility() == View.VISIBLE) { int width = revealView.getMeasuredWidth(); int height = revealView.getMeasuredHeight(); - float revealRadius = (float) Math.sqrt((width * width) / 4 + (height * height) / 4); + float revealRadius = (float) Math.hypot(width / 2, height / 2); revealView.setVisibility(View.VISIBLE); revealView.setAlpha(1f); revealView.setTranslationY(0); |