Full-screen folders: apps at the bottom in the home screen's grid
At the user's request, a folder on the home screen or in the dock opens over the whole screen instead of as a floating panel. Settings, Folders, "Full screen folders", on by default; switched off, folders float as before. Folders in the app list are unchanged. - No panel. The home screen behind is darkened and blurred as behind the app drawer: black at 78% (FlexeraDrawer.BACKDROP_COLOR) and the largest blur radius, which the drawer's depth comes to. - The apps sit at the bottom of the screen, centred, just above the navigation bar, with white labels and the folder's name below them, wherever the folder's icon is. - They are laid out like the home screen's icons: its column count, filled row by row (FolderGridOrganizer.createFullScreenFolderGridOrganizer), in cells the size of the home screen's cells as a page lays them out (larger than the device profile's cell size, which the page stretches), so that the columns line up with the home screen's. A row is never lower than one app with its label needs. The folder icon's preview keeps the folder grid. While a full-screen folder is open, state changes leave the scrim alone (WorkspaceStateTransitionAnimation.setScrim), so that dragging an app inside the folder no longer lightens its backdrop; the folder hands the scrim back as it closes. The depth controller's folder blur now carries its own strength (FolderBlur.strength); quick launch scales its blur by FolderBlur.STRENGTH itself and looks as before. While full-screen folders are on, Settings hides the panel's opacity and the folder column count, which do not apply to them. Checked on the emulator (Android 17, 4-column test grid): open, tap an app, tap outside, Back, rename with the keyboard (the folder lifts above it), reorder inside the folder (the backdrop holds), drag an app out to the home screen, the setting off and on again (the floating folder comes back with its panel, 3 columns and dark labels), and columns and rows 259 and 243 px apart, as on the home screen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a79962e5c4
commit
2a14ae11e0
12 files changed
+335
-39
No files matched your search
@@ -39,6 +39,7 @@ import com.android.launcher3.AbstractFloatingView;
|
||||
import com.android.launcher3.BubbleTextView;
|
||||
import com.android.launcher3.CellLayout;
|
||||
import com.android.launcher3.DeviceProfile;
|
||||
import com.android.launcher3.Launcher;
|
||||
import com.android.launcher3.PagedView;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.ShortcutAndWidgetContainer;
|
||||
@@ -67,6 +68,8 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.function.ToIntFunction;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import app.flexera.home.FullScreenFolders;
|
||||
|
||||
public class FolderPagedView extends PagedView<PageIndicatorDots> implements ClipPathView {
|
||||
|
||||
private static final String TAG = "FolderPagedView";
|
||||
@@ -88,7 +91,10 @@ public class FolderPagedView extends PagedView<PageIndicatorDots> implements Cli
|
||||
|
||||
@Thunk final ArrayMap<View, Runnable> mPendingAnimations = new ArrayMap<>();
|
||||
|
||||
private final FolderGridOrganizer mOrganizer;
|
||||
// Flexera Launcher: not final; a full-screen folder has a grid of its own (setFullScreen).
|
||||
private FolderGridOrganizer mOrganizer;
|
||||
private final FolderGridOrganizer mFloatingOrganizer;
|
||||
private boolean mFullScreen;
|
||||
private final ViewCache mViewCache;
|
||||
|
||||
private int mAllocatedContentSize;
|
||||
@@ -124,6 +130,7 @@ public class FolderPagedView extends PagedView<PageIndicatorDots> implements Cli
|
||||
super(context, attrs);
|
||||
ActivityContext activityContext = ActivityContext.lookupContext(context);
|
||||
mOrganizer = folderGridOrganizer;
|
||||
mFloatingOrganizer = folderGridOrganizer;
|
||||
|
||||
mIsRtl = Utilities.isRtl(getResources());
|
||||
setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_YES);
|
||||
@@ -138,6 +145,19 @@ public class FolderPagedView extends PagedView<PageIndicatorDots> implements Cli
|
||||
initParentViews(folder);
|
||||
}
|
||||
|
||||
/**
|
||||
* Flexera Launcher: a full-screen folder (app.flexera.home.FullScreenFolders) lays its apps out
|
||||
* in the home screen's columns, each as wide as on the home screen; a floating one in its own
|
||||
* grid. Called as the folder opens, before its items are bound.
|
||||
*/
|
||||
void setFullScreen(boolean fullScreen) {
|
||||
mFullScreen = fullScreen;
|
||||
mOrganizer = fullScreen
|
||||
? FolderGridOrganizer.createFullScreenFolderGridOrganizer(
|
||||
mFolder.mActivityContext.getDeviceProfile())
|
||||
: mFloatingOrganizer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets up the grid size such that {@param count} items can fit in the grid.
|
||||
*/
|
||||
@@ -359,6 +379,16 @@ public class FolderPagedView extends PagedView<PageIndicatorDots> implements Cli
|
||||
}
|
||||
}
|
||||
|
||||
// Flexera Launcher: white labels over the dimmed home screen of a full-screen folder. Set
|
||||
// both ways, as the views are reused from one folder to the next.
|
||||
if (!mFolder.isInAppDrawer()) {
|
||||
if (icon instanceof AppPairIcon appPair) {
|
||||
FullScreenFolders.styleLabel(appPair.getTitleTextView(), mFolder.isFullScreen());
|
||||
} else if (icon instanceof BubbleTextView label) {
|
||||
FullScreenFolders.styleLabel(label, mFolder.isFullScreen());
|
||||
}
|
||||
}
|
||||
|
||||
icon.setOnClickListener(mFolder.mActivityContext.getItemOnClickListener());
|
||||
icon.setOnLongClickListener(mFolder);
|
||||
icon.setOnFocusChangeListener(mFocusIndicatorHelper);
|
||||
@@ -392,6 +422,10 @@ public class FolderPagedView extends PagedView<PageIndicatorDots> implements Cli
|
||||
// Lawnchair: Find the correct folder size depending on which parent owned them
|
||||
if (mFolder.isInAppDrawer()) {
|
||||
page.setCellDimensions(grid.getAllAppsProfile().getCellWidthPx(), grid.getAllAppsProfile().getCellHeightPx());
|
||||
} else if (mFullScreen && mFolder.mActivityContext instanceof Launcher launcher) {
|
||||
// Flexera Launcher: cells as large as the home screen's, so that the apps line up.
|
||||
Point cell = FullScreenFolders.cellSize(launcher);
|
||||
page.setCellDimensions(cell.x, cell.y);
|
||||
} else {
|
||||
page.setCellDimensions(grid.folderCellWidthPx, grid.folderCellHeightPx);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user