Skip to content

fix(android): align drawer icon with top app bar - #82

Open
jsdatarocks wants to merge 1 commit into
NativePHP:mainfrom
jsdatarocks:fix/android-drawer-icon-alignment
Open

fix(android): align drawer icon with top app bar#82
jsdatarocks wants to merge 1 commit into
NativePHP:mainfrom
jsdatarocks:fix/android-drawer-icon-alignment

Conversation

@jsdatarocks

@jsdatarocks jsdatarocks commented Aug 29, 2026

Copy link
Copy Markdown

Description

Summary

Vertically aligns the Android drawer icon with the top app bar by increasing its top padding from 4.dp to 8.dp.

This complements the navigation slot reservation introduced by NativePHP/mobile-ui#81: that change prevents the navigation title from overlapping the drawer icon, while this change centers the icon within the top app bar.

Problem

On Android, the drawer icon is rendered as a top-left overlay by NativeLayoutDrawerHost. After applying the status bar inset, the existing 4.dp top padding positions the icon slightly above the top app bar's visual center.

The horizontal position is already correct, but the vertical offset makes the drawer icon appear misaligned relative to the navigation title and trailing actions.

Captura de Tela 2026-08-29 às 19 31 00

Changes

  • Changes the drawer icon's top padding from 4.dp to 8.dp on Android.
  • Keeps the existing 4.dp start padding unchanged.
  • Leaves drawer state, gestures, rendering, and navigation slot reservation unchanged.
  • Does not affect iOS.
Captura de Tela 2026-08-29 às 20 07 26

Dependency and rollout

This is a self-contained layout adjustment and introduces no new API or dependency requirements.

It complements NativePHP/mobile-ui#81 and its companion NativePHP/mobile-air#404, but does not depend on their new registration API and can be reviewed independently.

For end-to-end verification of the complete drawer navigation bar layout, test this change together with those PRs.

Testing

This change only adjusts a Compose layout constant and has no automated behavioral coverage.

It should be manually verified on Android with:

  • Tab and stack layouts using a drawer.
  • Root screens without a back button.
  • Navigation bars with and without trailing actions.
  • Short and long navigation titles.
  • Devices or emulators with different status bar insets.
  • Both modal and reveal drawer variants.

Confirm that the drawer icon is vertically centered with the navigation title and trailing actions, remains correctly inset from the status bar, and still opens the drawer normally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant