A user reported that after setting margins on the home screen the app
drawer showed the alphabet but no apps at all.
The drawer's side padding (DeviceProfile.updateAllAppsContainerWidth)
is built from the workspace side margin and then multiplied by
Lawnchair's drawer indent factor, 0.1 x 100 = 10 on a phone. At the
grid's own 8 dp the base came to 0 and the drawer got the fallback of
10 px. Since 1.0.5 that margin is the owner's Side margins setting, so
every pixel above 8 dp became ten pixels of drawer padding on each
side. Measured on the emulator with 1.0.7 (1080 px wide): 24 dp gave
420 px a side, a strip of icons with no names; 36 dp gave 740 px a
side, no rows and no search field, only the wave alphabet, which lies
over the list and does not use that padding.
The drawer now keeps the grid's own side margin, taken before the
owner's replaces it (flexeraGridSideMarginPx), scaled as the
workspace's is on a scalable grid. The home screen still uses the
owner's margin; top and bottom margins never reached the drawer.
Tested on the emulator (debug build): side margins 24 and 48 dp leave
the drawer padding at 10 px and the list as at 8 dp, with names and
the search field; the home screen still shows the wider margins.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The owner reported that the preview did not show the top and bottom
margins. On the emulator it did, but little: the rows share the height
the margins leave, so a first row moves by less than the margin, and
at about 40% of real size a 16 dp margin moves it some 6 dp. On a page
with few icons that is hard to see. At large values it also went wrong
the other way: a phone's grid (not scalable) does not shrink its icons
to fit shorter rows, so with labels on, 120 dp top and bottom cut off
the last row's labels (cell height 201 px, rows got 179 px).
Now:
- The preview draws the margins: tinted bands along the sides and
above and below the rows, as wide as they are laid out, and a dashed
outline around the rows (HomeMargins.Guides, through a new overlay
slot in GridOverridesPreview). They show however empty the page is.
- Top and bottom margins take only the height the rows can spare
beyond their icons and labels, cut in proportion
(HomeMargins.fitTopBottom, in DeviceProfile.updateWorkspacePadding);
DeviceProfile keeps what it laid out (flexeraTopMarginPx,
flexeraBottomMarginPx) for the guides.
- When the grid has room for less than the sliders ask, a note under
them says so and that fewer rows or columns leave more room.
- The class comment no longer claims that rows too short get smaller
icons; that was wrong for these grids.
Tested on the emulator: guides on a 5x5 and a 4x9 grid line up with
the rows and columns; on 5x5 with labels 120/120 fits whole and no
label is cut; on 4x9 with labels the bands shrink to what fits and the
note shows; 8, 0, 0 leaves the layout as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The side, top and bottom margins move from the Home screen settings to
the grid page, renamed "Grid and margins", under its preview of the
home screen. The preview shows the margins being chosen together with
the columns, rows and dock icons, and nothing changes on the home
screen until Apply.
The preview builds its own InvariantDeviceProfile from
PreviewOverrides, as it does for a foldable's dock icons; the overrides
now carry the three margins, the IDP keeps them for the device profiles
it makes (set before initGrid, which makes them), and DeviceProfile
uses them in place of the kept preferences. Apply writes them with the
grid. HomeScreenGridPreferences keeps a little more room for the
settings under the preview (0.46 of the height instead of 0.40), as its
own comment asks when preferences are added.
Tested on the emulator: the page shows the preview; 40, 48, 48 dp moved
the preview's columns in and rows down while the launcher still
reported 8 dp and 0; after Apply the home screen matched the preview;
8, 0, 0 and Apply restored it. The Home screen page lists "Grid and
margins" and no longer has the sliders.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Settings, Home screen, Layout had Horizontal padding and Vertical
padding, as percentages from 0 to 200. They scaled the grid's own
margins, which on a phone are 8 dp at the sides and nothing at the top
and bottom (measured on the emulator: desiredWorkspaceHorizontalMarginPx
21 px, workspace top and bottom padding 0). So the whole horizontal
range moved the outer icons by a few dp and the vertical one did
nothing at all, and the settings seemed broken.
They are replaced by three sliders in dp (app.flexera.home.HomeMargins):
Side margins (0 to 48, default 8, the grid's own), Top margin and
Bottom margin (0 to 120, default 0, added to the grid's own). Rows and
columns share the room that is left, so larger margins also bring the
icons closer together. Rows that become too short get smaller icons, as
Launcher3 already does; side margins are capped so that every column
stays wider than what is seen of its icon plus 4 dp. The old factors
are read as 1 from now on, so a value set with the old sliders no
longer applies.
Hooks: DeviceProfile (side margin where the grid's margin is set, top
and bottom where the workspace padding is), PreferenceManager2 (three
int preferences that reload the grid), HomeScreenPreferences (the
sliders), each marked "Flexera Launcher:".
Tested on the emulator: at the defaults the home screen is pixel for
pixel as before (apart from clocks showing the time); 40, 48, 48 moves
the columns in and the rows down and closer, with no overlap; back to
8, 0, 0 restores the layout.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comments only: git grep "Flexera Launcher:" now finds every behaviour
change Flexera made to an upstream file, so that upstream merges stay
easy. A reviewer rebuilt the files as they were before this pass and
found every code token unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Widgets of other apps used to fill their cells minus Launcher3's widget
padding, which is a few pixels wider than the icons' edges and reaches down
into the room kept for icon labels; on the owner's phone they hung about
13 px past the icons sideways and 40 px below. Now the room a widget keeps in
its cells is the distance from the cell edges to the icon edges, worked out
as IconFrame does for the launcher's own widgets, so every widget's edges
meet the edges of the icons around it.
The one function (FlexeraWidgets.appWidgetPadding) is used for the layout,
for the size the app is told, for the drop animation and through
WidgetSizes for previews. The cells a widget needs are still worked out
with Launcher3's padding, so no widget changes its cell count. A new switch
under Settings, Home screen, Widgets ("Line up with icons", on by default)
turns it off; Lawnchair's Widget padding slider shows only then.
Checked on the emulator against lines drawn at the icon edges: Google
Calendar's widgets meet them within 2 px; Google Clock's sits about 20 px
inside, because it draws an empty margin of its own.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PRD M2 (AD-1 to AD-3, AD-7, AD-8, HS-7). The drawer keeps Launcher3's adapter, sorting,
live updates, click, long-press menu and drag; only what differs from the grid is new.
- FlexeraDrawer (flexera/src): column count, row styling, and a letter-header adapter item
- flexera/res/layout/all_apps_icon.xml overrides Launcher3's grid cell with a horizontal
row (46dp icon, name beside it, 64dp tall)
- AlphabeticalAppsList adds a header item at the start of each letter group and points
the fast-scroll section at it; Private Space keeps its own framing
- BaseAllAppsAdapter creates and binds the header view type and styles rows
- DeviceProfileOverrides forces one drawer column
- DeviceProfile.getAllAppsIconStartMargin returns the row padding for a one-column
drawer, which keeps the search bar full width
- Suggested apps row above the list is off by default
Tested on the Android 17 emulator: scrolling, tap to launch, long-press menu, drag to the
home screen, and live removal and return of an app all work. The right-edge fast
scroller did not respond to scripted drags and still needs a hand test.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Home screen > Icon size (homeIconSizeFactor) had no effect on responsive
grids such as "practical": DeviceProfileOverrides scales the IDP's
iconSize, but responsive grids take their icon size from their cell
specs (mResponsiveWorkspaceCellSpec.getIconSize()) and never read
inv.iconSize.
getResponsiveIconSizePx() now applies the factor to the cell specs' icon
size, for the workspace, the hotseat and folder content, the same three
places the IDP-sized grids use inv.iconSize. The responsive code still
shrinks an icon that doesn't fit its cell (getIconSmallerThan). The icon
bitmap size already followed the factor, as the IDP computes it from the
scaled iconSize.
Visible change: on responsive grids the setting now works; at 100% (the
default) nothing changes.
(cherry picked from commit 6345b71df7dbd77be6c4da03ddcc76ebcadd2e90)
Co-authored-by: Claude <noreply@anthropic.com>
Adds user-configurable spacing controls (similar to Nova Launcher):
- Workspace padding: horizontal & vertical sliders (Home screen > Layout).
Horizontal factor is applied to the source margin so cells fill the
freed space; vertical factor preserves the dock reservation so the last
row never overlaps the hotseat.
- Widget padding: slider (Home screen > Widgets), 0% removes the forced
padding, up to 200%.
- App drawer top padding slider (App drawer > Grid).
- Widget resize: respect the overridden resize mode so force/unlimited
resize shows handles even for widgets whose provider limits resizing.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
* Fix foldable device layout issue on Pixel 9 Pro Fold
- Enable two-panel layout for all multi-display devices (foldables)
- Previously required both isTablet && isMultiDisplay conditions
- Foldable devices may not meet 600dp tablet width threshold when unfolded
- This ensures proper layout utilization of available screen space
Fixes#5920
* Fix app drawer icon scaling when home screen icons are resized
- Prevent home screen icon scale from affecting app drawer layout
- When mIsScalableGrid is true, use separate scaling for app drawer elements
- This fixes the 'zoomed out' appearance in app drawer when home screen
icons are scaled to 120% or higher
- App drawer now maintains independent sizing from home screen
Fixes#5912
* Remove code comments from fixes
- Clean up code by removing explanatory comments
- Keep changes minimal and focused