From c7450e3ebd7672fcd7b9d51a8c1e68f63c5ce86b Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Tue, 17 Apr 2012 17:34:08 -0700 Subject: Updating launcher transitions. Change-Id: I32b35189fe05a1c0db0ac1d7f508b1560088f635 --- src/com/android/launcher2/AppsCustomizeTabHost.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/com/android/launcher2/AppsCustomizeTabHost.java') diff --git a/src/com/android/launcher2/AppsCustomizeTabHost.java b/src/com/android/launcher2/AppsCustomizeTabHost.java index 0c5bbeb7e..21842da3b 100644 --- a/src/com/android/launcher2/AppsCustomizeTabHost.java +++ b/src/com/android/launcher2/AppsCustomizeTabHost.java @@ -57,6 +57,8 @@ public class AppsCustomizeTabHost extends TabHost implements LauncherTransitiona private boolean mResetAfterTransition; private Runnable mRelayoutAndMakeVisible; + private Launcher mLauncher; + public AppsCustomizeTabHost(Context context, AttributeSet attrs) { super(context, attrs); mLayoutInflater = LayoutInflater.from(context); @@ -68,6 +70,10 @@ public class AppsCustomizeTabHost extends TabHost implements LauncherTransitiona }; } + public void setup(Launcher launcher) { + mLauncher = launcher; + } + /** * Convenience methods to select specific tabs. We want to set the content type immediately * in these cases, but we note that we still call setCurrentTabByTag() so that the tab view @@ -463,6 +469,17 @@ public class AppsCustomizeTabHost extends TabHost implements LauncherTransitiona // Load the current page synchronously, and the neighboring pages asynchronously mAppsCustomizePane.loadAssociatedPages(mAppsCustomizePane.getCurrentPage(), true); mAppsCustomizePane.loadAssociatedPages(mAppsCustomizePane.getCurrentPage()); + + // We had to enable the wallpaper visibility when launching apps from all apps (so that + // the transitions would be the same as when launching from workspace) so we need to + // re-disable the wallpaper visibility to ensure performance. + int duration = getResources().getInteger(android.R.integer.config_shortAnimTime); + postDelayed(new Runnable() { + @Override + public void run() { + mLauncher.updateWallpaperVisibility(false); + } + }, duration); } } -- cgit v1.2.3