Updating launcher transitions.

Change-Id: I32b35189fe05a1c0db0ac1d7f508b1560088f635
This commit is contained in:
Winson Chung
2012-04-17 17:34:08 -07:00
parent c3a8040428
commit c7450e3ebd
4 changed files with 42 additions and 7 deletions

View File

@@ -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);
}
}