mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 01:46:49 +00:00
Updating launcher transitions.
Change-Id: I32b35189fe05a1c0db0ac1d7f508b1560088f635
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user