private void reloadCurrentPage() { if (!LauncherApplication.isScreenLarge()) { mAppsCustomizePane.flashScrollingIndicator(true); } mAppsCustomizePane.loadAssociatedPages(mAppsCustomizePane.getCurrentPage()); mAppsCustomizePane.requestFocus(); }
@Override public void onLauncherTransitionEnd(Launcher l, boolean animated, boolean toWorkspace) { mAppsCustomizePane.onLauncherTransitionEnd(l, animated, toWorkspace); mInTransition = false; if (animated) { setLayerType(LAYER_TYPE_NONE, null); /* YUNOS BEGIN */ // ##date:2014/3/20 ##author:xindong.zxd // improve fluency that widget slide mAppsCustomizePane.setLayerType(LAYER_TYPE_NONE, null); /* YUNOS END */ } if (!toWorkspace) { // Dismiss the workspace cling l.dismissWorkspaceCling(null); /* YUNOS BEGIN */ // ##date:2013/11/27 ##author:zhangqiang.zq // remove cling // Show the all apps cling (if not already shown) // mAppsCustomizePane.showAllAppsCling(); // Make sure adjacent pages are loaded (we wait until after the transition to // prevent slowing down the animation) /* YUNOS END */ mAppsCustomizePane.loadAssociatedPages(mAppsCustomizePane.getCurrentPage()); if (!LauncherApplication.isScreenLarge()) { mAppsCustomizePane.hideScrollingIndicator(false); } // Going from Workspace -> All Apps // NOTE: We should do this at the end since we check visibility state in some of the // cling initialization/dismiss code above. setVisibilityOfSiblingsWithLowerZOrder(INVISIBLE); } }
/* LauncherTransitionable overrides */ @Override public void onLauncherTransitionPrepare(Launcher l, boolean animated, boolean toWorkspace) { mAppsCustomizePane.onLauncherTransitionPrepare(l, animated, toWorkspace); mInTransition = true; mTransitioningToWorkspace = toWorkspace; if (toWorkspace) { // Going from All Apps -> Workspace setVisibilityOfSiblingsWithLowerZOrder(VISIBLE); // Stop the scrolling indicator - we don't want All Apps to be invalidating itself // during the transition, especially since it has a hardware layer set on it mAppsCustomizePane.cancelScrollingIndicatorAnimations(); } else { // Going from Workspace -> All Apps mContent.setVisibility(VISIBLE); // YUNOS BEGIN // ##date:2014/8/27 ##author:hongchao.ghc ##BugID:5208929 int currentPage = mAppsCustomizePane.getCurrentPage(); if (currentPage >= mAppsCustomizePane.getPageCount()) { mAppsCustomizePane.setCurrentPage(0); } // YUNOS END // Make sure the current page is loaded (we start loading the side pages after the // transition to prevent slowing down the animation) mAppsCustomizePane.loadAssociatedPages(mAppsCustomizePane.getCurrentPage(), true); if (!LauncherApplication.isScreenLarge()) { mAppsCustomizePane.showScrollingIndicator(true); } } if (mResetAfterTransition) { mAppsCustomizePane.reset(); mResetAfterTransition = false; } }