summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/AppsCustomizeTabHost.java
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2012-04-17 17:34:08 -0700
committerWinson Chung <winsonc@google.com>2012-04-24 13:27:00 -0700
commitc7450e3ebd7672fcd7b9d51a8c1e68f63c5ce86b (patch)
tree9991c4069a8a0c7d599daf21bcfb72fd630549c1 /src/com/android/launcher2/AppsCustomizeTabHost.java
parentc3a804042844dc4733b4bd4b6ac03bf4b2b015b7 (diff)
downloadandroid_packages_apps_Trebuchet-c7450e3ebd7672fcd7b9d51a8c1e68f63c5ce86b.tar.gz
android_packages_apps_Trebuchet-c7450e3ebd7672fcd7b9d51a8c1e68f63c5ce86b.tar.bz2
android_packages_apps_Trebuchet-c7450e3ebd7672fcd7b9d51a8c1e68f63c5ce86b.zip
Updating launcher transitions.
Change-Id: I32b35189fe05a1c0db0ac1d7f508b1560088f635
Diffstat (limited to 'src/com/android/launcher2/AppsCustomizeTabHost.java')
-rw-r--r--src/com/android/launcher2/AppsCustomizeTabHost.java17
1 files changed, 17 insertions, 0 deletions
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);
}
}