Fixing screen jump when going to spring_loaded mode in rtl
> Removing call to snapToScreen when changing state > Marking adjacent pages visible in overview and spring_loaded mode, so that they get drawn atleast once. Change-Id: If305e0d4cfa63bac03f301d69017da55f89155bd
This commit is contained in:
1 parent
0edfe2c880
commit
ce5a7e5ee4
4 files changed
+51
-51
No files matched your search
@@ -182,7 +182,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,
|
||||
@@ -206,7 +205,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 &&
|
||||
@@ -215,11 +214,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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -250,7 +247,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) {
|
||||
@@ -435,7 +432,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;
|
||||
@@ -487,8 +484,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);
|
||||
}
|
||||
|
||||
@@ -496,9 +493,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,
|
||||
@@ -523,7 +519,7 @@ public class LauncherStateTransitionAnimation {
|
||||
};
|
||||
}
|
||||
};
|
||||
startAnimationToWorkspaceFromOverlay(toWorkspaceState, toWorkspacePage, widgetsView,
|
||||
startAnimationToWorkspaceFromOverlay(toWorkspaceState, widgetsView,
|
||||
widgetsView.getContentView(), widgetsView.getRevealView(), null, animated,
|
||||
onCompleteRunnable, cb);
|
||||
}
|
||||
@@ -532,7 +528,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();
|
||||
@@ -555,7 +551,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) {
|
||||
|
||||
Reference in new issue
Block a user