Separate some elements to set visibility separately

Added entries for:
- All apps header extra content
- Hotseat extra content

Change-Id: I47c4ccfe3b54fd47cbbee88698ed045611e3e92d
This commit is contained in:
Tony Wickham
2018-03-21 08:16:33 -07:00
parent c1b6157398
commit bd6f05e0b6
8 changed files with 44 additions and 24 deletions

View File

@@ -111,16 +111,17 @@ public class OverviewState extends LauncherState {
public int getVisibleElements(Launcher launcher) {
if (launcher.getDeviceProfile().isVerticalBarLayout()) {
// TODO: Remove hotseat from overview
return HOTSEAT;
return HOTSEAT_ICONS;
} else {
return launcher.getAppsView().getFloatingHeaderView().hasVisibleContent()
? ALL_APPS_HEADER : HOTSEAT;
? HOTSEAT_EXTRA | ALL_APPS_HEADER_EXTRA : HOTSEAT_ICONS | HOTSEAT_EXTRA;
}
}
@Override
public float getVerticalProgress(Launcher launcher) {
if (getVisibleElements(launcher) == HOTSEAT) {
if ((getVisibleElements(launcher) & ALL_APPS_HEADER_EXTRA) == 0) {
// We have no all apps content, so we're still at the fully down progress.
return super.getVerticalProgress(launcher);
}
return 1 - (getDefaultSwipeHeight(launcher)