summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/LauncherStateTransitionAnimation.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2015-07-10 23:43:54 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-07-10 23:43:54 +0000
commit3f99a1440ed32acdcbc088ceff93d80f98df15c1 (patch)
tree873b4195c5898319ac0e137ca2c68f186d84baa3 /src/com/android/launcher3/LauncherStateTransitionAnimation.java
parent19795603fe10ba20008bf01e059725562eb78b83 (diff)
parentce5a7e5ee4c880081faef3a508f68725d0317ee9 (diff)
downloadandroid_packages_apps_Trebuchet-3f99a1440ed32acdcbc088ceff93d80f98df15c1.tar.gz
android_packages_apps_Trebuchet-3f99a1440ed32acdcbc088ceff93d80f98df15c1.tar.bz2
android_packages_apps_Trebuchet-3f99a1440ed32acdcbc088ceff93d80f98df15c1.zip
Merge "Fixing screen jump when going to spring_loaded mode in rtl" into ub-launcher3-master
Diffstat (limited to 'src/com/android/launcher3/LauncherStateTransitionAnimation.java')
-rw-r--r--src/com/android/launcher3/LauncherStateTransitionAnimation.java26
1 files changed, 11 insertions, 15 deletions
diff --git a/src/com/android/launcher3/LauncherStateTransitionAnimation.java b/src/com/android/launcher3/LauncherStateTransitionAnimation.java
index 0ea9d8bd0..f63e0f469 100644
--- a/src/com/android/launcher3/LauncherStateTransitionAnimation.java
+++ b/src/com/android/launcher3/LauncherStateTransitionAnimation.java
@@ -193,7 +193,6 @@ public class LauncherStateTransitionAnimation {
*/
public void startAnimationToWidgets(final boolean animated) {
final WidgetsContainerView toView = mLauncher.getWidgetsView();
- final Resources res = mLauncher.getResources();
PrivateTransitionCallbacks cb = new PrivateTransitionCallbacks() {
@Override
public void onRevealViewVisible(View revealView, View contentView,
@@ -217,7 +216,7 @@ public class LauncherStateTransitionAnimation {
* Starts and animation to the workspace from the current overlay view.
*/
public void startAnimationToWorkspace(final Launcher.State fromState,
- final Workspace.State toWorkspaceState, final int toWorkspacePage,
+ final Workspace.State toWorkspaceState,
final boolean animated, final Runnable onCompleteRunnable) {
if (toWorkspaceState != Workspace.State.NORMAL &&
toWorkspaceState != Workspace.State.SPRING_LOADED &&
@@ -226,11 +225,9 @@ public class LauncherStateTransitionAnimation {
}
if (fromState == Launcher.State.APPS || fromState == Launcher.State.APPS_SPRING_LOADED) {
- startAnimationToWorkspaceFromAllApps(toWorkspaceState, toWorkspacePage,
- animated, onCompleteRunnable);
+ startAnimationToWorkspaceFromAllApps(toWorkspaceState, animated, onCompleteRunnable);
} else {
- startAnimationToWorkspaceFromWidgets(toWorkspaceState, toWorkspacePage,
- animated, onCompleteRunnable);
+ startAnimationToWorkspaceFromWidgets(toWorkspaceState, animated, onCompleteRunnable);
}
}
@@ -261,7 +258,7 @@ public class LauncherStateTransitionAnimation {
// Create the workspace animation.
// NOTE: this call apparently also sets the state for the workspace if !animated
- Animator workspaceAnim = mLauncher.startWorkspaceStateChangeAnimation(toWorkspaceState, -1,
+ Animator workspaceAnim = mLauncher.startWorkspaceStateChangeAnimation(toWorkspaceState,
animated, overlaySearchBarView != null /* hasOverlaySearchBar */, layerViews);
if (animated && initialized) {
@@ -447,7 +444,7 @@ public class LauncherStateTransitionAnimation {
* Starts and animation to the workspace from the apps view.
*/
private void startAnimationToWorkspaceFromAllApps(final Workspace.State toWorkspaceState,
- final int toWorkspacePage, final boolean animated, final Runnable onCompleteRunnable) {
+ final boolean animated, final Runnable onCompleteRunnable) {
AllAppsContainerView appsView = mLauncher.getAppsView();
PrivateTransitionCallbacks cb = new PrivateTransitionCallbacks() {
int[] mAllAppsToPanelDelta;
@@ -499,8 +496,8 @@ public class LauncherStateTransitionAnimation {
}
};
// Only animate the search bar if animating to spring loaded mode from all apps
- startAnimationToWorkspaceFromOverlay(toWorkspaceState, toWorkspacePage, appsView,
- appsView.getContentView(), appsView.getRevealView(), appsView.getSearchBarView(),
+ startAnimationToWorkspaceFromOverlay(toWorkspaceState, appsView, appsView.getContentView(),
+ appsView.getRevealView(), appsView.getSearchBarView(),
animated, onCompleteRunnable, cb);
}
@@ -508,9 +505,8 @@ public class LauncherStateTransitionAnimation {
* Starts and animation to the workspace from the widgets view.
*/
private void startAnimationToWorkspaceFromWidgets(final Workspace.State toWorkspaceState,
- final int toWorkspacePage, final boolean animated, final Runnable onCompleteRunnable) {
+ final boolean animated, final Runnable onCompleteRunnable) {
final WidgetsContainerView widgetsView = mLauncher.getWidgetsView();
- final Resources res = mLauncher.getResources();
PrivateTransitionCallbacks cb = new PrivateTransitionCallbacks() {
@Override
public void onRevealViewVisible(View revealView, View contentView,
@@ -535,7 +531,7 @@ public class LauncherStateTransitionAnimation {
};
}
};
- startAnimationToWorkspaceFromOverlay(toWorkspaceState, toWorkspacePage, widgetsView,
+ startAnimationToWorkspaceFromOverlay(toWorkspaceState, widgetsView,
widgetsView.getContentView(), widgetsView.getRevealView(), null, animated,
onCompleteRunnable, cb);
}
@@ -544,7 +540,7 @@ public class LauncherStateTransitionAnimation {
* Creates and starts a new animation to the workspace.
*/
private void startAnimationToWorkspaceFromOverlay(final Workspace.State toWorkspaceState,
- final int toWorkspacePage, final View fromView, final View contentView,
+ final View fromView, final View contentView,
final View revealView, final View overlaySearchBarView, final boolean animated,
final Runnable onCompleteRunnable, final PrivateTransitionCallbacks pCb) {
final Resources res = mLauncher.getResources();
@@ -567,7 +563,7 @@ public class LauncherStateTransitionAnimation {
// Create the workspace animation.
// NOTE: this call apparently also sets the state for the workspace if !animated
Animator workspaceAnim = mLauncher.startWorkspaceStateChangeAnimation(toWorkspaceState,
- toWorkspacePage, animated, overlaySearchBarView != null /* hasOverlaySearchBar */,
+ animated, overlaySearchBarView != null /* hasOverlaySearchBar */,
layerViews);
if (animated && initialized) {