Commit Graph
746 Commits
Author SHA1 Message Date
TMCandClaude Opus 5.5 a56160c07b Drawer: keep the grid's own side margin, not the home screen's
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>
2026-11-18 19:54:56 +01:00
TMCandClaude Opus 5.5 6e88f7c81b Grid and margins: draw the margins in the preview; fit them to the rows
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>
2026-11-18 14:44:33 +01:00
TMCandClaude Opus 5.5 be15483e34 Home screen margins: on the grid page, with its live preview
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>
2026-11-18 12:57:28 +01:00
TMCandClaude Opus 5.5 ec5b36c482 Home screen: side, top and bottom margins in dp
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>
2026-11-18 12:27:09 +01:00
TMCandClaude Opus 5.5 7dfc8f24ea Mark every Flexera edit to Lawnchair and Launcher3 files
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>
2026-11-14 18:50:52 +01:00
TMCandClaude Opus 5.5 f5d7cf07ed Line up every widget with the icons, as the Pictures widget does
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>
2026-11-13 12:19:33 +01:00
TMCandClaude Fable 5.2 76c3603693 Turn the app drawer into a one-column list with letter headers
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>
2026-11-11 21:25:41 +01:00
x-JOCandClaude 59b60098b2 fix(grid): apply the icon size setting on responsive grids (#7407)
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>
2026-10-21 17:10:33 +08:00
Joseph Petersen 85335d904a fix(dock): remove unused label space when labels are hidden (#7364)
* fix(dock): remove unused label space when labels are hidden

* test(dock): remove tests and setup per review
2026-10-14 00:50:16 +08:00
Pun Butrach 4c76a6bb64 fix: Blank QSB space being override by hotseat grid adjustment (#7148) 2026-08-12 21:23:26 +07:00
John Andrew Camu 99a4e77713 feat: implementation scroll dock page (#7120)
- Closes: #3491
2026-08-08 18:04:55 +08:00
Pun Butrach 8cb7ea8ec4 revert: fix: Align widget visually to the icon (#7095) 2026-08-05 17:54:07 +07:00
Pun Butrach beeb036ff7 fix: Align widget visually to the icon (#7047)
Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
2026-07-22 22:46:06 +07:00
John Andrew Camu 6741c3416d feat: Add option to have two-row dock (#6979)
- Closes: #3216
2026-07-11 16:58:57 +08:00
Pun Butrach c3d1ba01f9 fix: Compose QSB does not relinquish space when it's disabled (#6960)
Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
2026-07-09 15:25:54 +00:00
266c07c808 feat: Improve Lawnchair grid specifications (#6583)
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: TheSuperDragon <70206496+superdragonxd@users.noreply.github.com>
Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
2026-06-28 08:37:50 +00:00
Branden GhenaandPun Butrach 61fb6decdf fix: align home screen icons based on text size (#6921)
* Align icons based on text size

* chore: Apply suggestions

---------

Co-authored-by: Pun Butrach <pun.butrach@gmail.com>
2026-06-28 05:40:53 +00:00
Pun Butrach 83658ce7eb perf: Cache PreferenceManager2 in memory (#6897)
Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
2026-06-19 18:21:55 +00:00
x-JOCandClaude Opus 4.8 5de4bb09fa feat: Nova-style padding controls (#6872)
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>
2026-06-20 01:51:23 +08:00
Pun Butrach 0ee2d22f16 fix: Don't use workspace scale on allapps
Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
2026-03-21 00:42:32 +07:00
Pun Butrach 44dc0b11f0 feat: Fully reimplement customisation in IDP/DP
Signed-off-by: Pun Butrach <pun.butrach@gmail.com>

fix: Apply workspace page indicator early

Signed-off-by: Pun Butrach <pun.butrach@gmail.com>

fix: initGrid respect DBGridInfo

Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
2026-03-20 20:39:39 +07:00
Pun Butrach 18bbd19315 chore: Resolve TODOs
Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
2026-02-13 20:21:00 +07:00
Pun Butrach 436b59f0d4 Milestone D3R3, continue to D4R1 2026-01-10 20:51:17 +07:00
Pun Butrach f12b88cb60 feat: Tablet support (ish) 2026-01-10 20:51:14 +07:00
Pun Butrach 9b90822395 fix: Disable material expressive folder expansion animations 2026-01-10 20:51:07 +07:00
Abhishek Sharma 5f3a03f4fb feat: Add option to clear home screen in settings (#6125)
Signed-off-by: abhixv <abhi.sharma1@hotmail.com>
2026-01-10 20:51:01 +07:00
Pun Butrach 5882812a04 feat: Google Sans Flex 2026-01-10 20:50:16 +07:00
Pun Butrach ba22b763e9 feat: Tablet support (ish) 2026-01-10 20:50:16 +07:00
Pun Butrach 0e8b200bab fix: Just make submodule stay the same please intellj 2026-01-10 20:50:12 +07:00
Pun Butrach edfd0baad6 fix: Android 14/15 crash 2026-01-10 20:49:55 +07:00
Pun Butrach d36845897b feat: Better At-a-Glance perceptive wallpaper colour luminance detection 2026-01-10 20:49:46 +07:00
Pun Butrach 211f47c06c feat: Google Sans Flex 2026-01-10 20:49:19 +07:00
Pun Butrach 2e76c99dad fix: Conflict incoming changes from 15-dev 2026-01-10 20:49:12 +07:00
Pun Butrach 549597ca66 chore: Logging cleanup
Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
2026-01-10 20:48:44 +07:00
Pun Butrach bc989c1b68 fix: Qsb width sizing being incorrect due to zero dp
Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
2026-01-10 20:48:39 +07:00
Pun Butrach fdcd97fcd9 feat: Reimplement Hotseat, and Favorite application label toggle
Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
2026-01-10 20:48:39 +07:00
Pun Butrach 63db7f3218 revert: Don't update dependency to avoid cache invalidation and dagger (in)invalidation for now
Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
2026-01-10 20:48:37 +07:00
Pun Butrach 11f7abcb66 chore: Cleanup, and hidden feature logged
Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
2026-01-10 20:48:25 +07:00
Pun Butrach 7a5699e721 fix: A lot of stuff 2026-01-10 20:48:21 +07:00
Pun Butrach 0a446431eb build: SNAPSHOT 0 (Draft) 2026-01-10 20:47:59 +07:00
Pun Butrach b67168f737 Allocate insane memory just for CI
Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
2026-01-10 20:46:44 +07:00
Pun Butrach dd4a08be61 Merge tag 'android-16.0.0_r3' into 16-dev
Android 16.0.0 Release 3 (BP3A.250905.014)

Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
2026-01-10 20:46:04 +07:00
Clément Gayot fb845d1460 fix: Revert "Align widget padding to icons" (#6135) 2025-12-01 06:15:44 +08:00
MrSluffy 11a4b09680 fixed: all app icons changes too when home icons is > 120
- Closes : #5943
2025-10-12 17:00:20 +08:00
Himanshu Garg a2545ee91e Fix app drawer icon scaling when home screen icons are resized (#5932)
* 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
2025-10-08 14:30:56 +08:00
Sebastian Franco 136295f62a Moving AllApps device profile variables to their own class
Bug: 419264653
Flag: EXEMPT refactor
Test: DeviceProfileDumpTest
Test: All Image tests
Change-Id: I6490422d04f9f0aeaadf8271d4d11172f344660a
2025-05-30 09:56:01 -07:00
Sebastian Franco 8244449a9f Moving taskbar variables in DeviceProfile to their own class
Bug: 419264653
Flag: EXEMPT refactor
Test: DeviceProfileDumpTest
Test: All Image tests
Change-Id: I05ec9e15ef02096326596af4835adb706473a736
2025-05-29 11:04:06 -07:00
Treehugger Robot 3893804a59 Merge "Moving hotseat variables in DeviceProfile to their own class" into main 2025-05-29 09:01:51 -07:00
Uwais Ashraf 478f07798e Moving hotseat variables in DeviceProfile to their own class
Bug: 419264653
Flag: EXEMPT refactor
Test: DeviceProfileDumpTest
Test: All Image tests
Change-Id: I377b33668c3ed330d362527f62226dd84a5773db
2025-05-29 13:16:05 +00:00
Sebastian Franco 6dcdd67e23 Moving bottom sheet variables to their own class
Bug: 419264653
Flag: EXEMPT refactor
Test: DeviceProfileDumpTest
Test: All Image tests
Change-Id: Ibaee4e94e54dbeb2f79ea5c1b6e73415ae219251
2025-05-28 13:48:44 +00:00