Skip to content

Take the empty toolbar off the screen - #542

Merged
andiwand merged 1 commit into
redesignfrom
landing/10-drop-empty-action-bar
Jul 28, 2026
Merged

Take the empty toolbar off the screen#542
andiwand merged 1 commit into
redesignfrom
landing/10-drop-empty-action-bar

Conversation

@andiwand

@andiwand andiwand commented Jul 27, 2026

Copy link
Copy Markdown
Member

Last one in the stack, and the one that makes the rest of it look finished: after the open action, the ad removal and the document buttons all moved out of the options menu, the toolbar is an empty strip of colour at the top of every screen.

It cannot just be deleted, because it is also where the action modes live. find, tts and edit are raised with startSupportActionMode(), and appcompat puts those in the ActionBar's own container in place of the toolbar. So instead of a .NoActionBar theme, MainActivity hides the bar on start, and appcompat brings the container back on its own for as long as a mode is up - checkShowingFlags() shows it whenever an action mode is showing, whatever the app asked for.

That also keeps the window insets as they are. ActionBarOverlayLayout holds the system bar insets off the content and reports the toolbar's height onwards as an inset of its own, which is what MainActivity's listener pads main_root with: the find bar pushes the page down by exactly its own height, and nothing is padded while no mode is up. A NoActionBar theme swaps that decor for a FitWindowsLinearLayout, which pads itself by the system bars on top of the padding MainActivity already applies.

The fullscreen hide()/show() pair goes with it - with the bar hidden for good there is nothing to toggle, and show() would have put the empty bar back on leaving fullscreen.

Checked on a Pixel 6 Pro (API 36)

  • landing screen and open document: no bar, content starts at the status bar
  • search: the find bar slides in below the status bar and pushes the page down
  • edit: same, with its own title and save button
  • leaving either: the bar goes away again

./gradlew spotlessCheck lintProDebug testProDebugUnitTest clean, and all 20 instrumented tests pass on the emulator.

🤖 Generated with Claude Code

@andiwand
andiwand force-pushed the landing/09-document-action-buttons branch from bc5ef20 to 7f293d8 Compare July 27, 2026 22:01
@andiwand
andiwand force-pushed the landing/10-drop-empty-action-bar branch from 95c2c3d to e5a5631 Compare July 27, 2026 22:01
@andiwand
andiwand force-pushed the landing/09-document-action-buttons branch from 7f293d8 to 7ad72b3 Compare July 28, 2026 07:44
@andiwand
andiwand force-pushed the landing/10-drop-empty-action-bar branch from e5a5631 to 6d0423a Compare July 28, 2026 07:44
@andiwand
andiwand force-pushed the landing/09-document-action-buttons branch from 7ad72b3 to 4b8e9d0 Compare July 28, 2026 19:00
Base automatically changed from landing/09-document-action-buttons to redesign July 28, 2026 19:06
Nothing has been left in the options menu: the landing screen carries its
own headers, the open action went away with the direct picker, the ad
removal moved into the settings section and the document's actions moved
down to the buttons by the thumb. What stayed behind is an empty strip of
colour at the top of every screen.

The bar cannot simply be dropped though - it is where the action modes
appear. find, tts and edit are all raised with startSupportActionMode(),
and appcompat puts them in the ActionBar's own container, in place of the
toolbar. So rather than moving to a .NoActionBar theme, MainActivity hides
the bar on start and lets appcompat bring the container back for as long
as a mode is up: checkShowingFlags() shows it whenever an action mode is
showing, whatever the app asked for, and takes it away again when the mode
finishes.

That also leaves the window insets alone. ActionBarOverlayLayout keeps the
system bar insets off the content and reports the toolbar's height on to
the app as an inset of its own, which is what MainActivity's listener pads
main_root with - so the find bar pushes the page down by exactly its own
height, and nothing pads anything while no mode is up. A NoActionBar theme
would swap that decor for a FitWindowsLinearLayout, which pads itself by
the system bars on top of the padding MainActivity already applies.

The fullscreen hide()/show() pair goes with it: with the bar hidden for
good there is nothing left for it to toggle, and show() would have put the
empty bar back on leaving fullscreen.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LrDgmtcnqm8xEUtt42cTDd
@andiwand
andiwand force-pushed the landing/10-drop-empty-action-bar branch from 6d0423a to df5948a Compare July 28, 2026 19:06
@andiwand
andiwand marked this pull request as ready for review July 28, 2026 19:07
@andiwand
andiwand merged commit 0bb91e9 into redesign Jul 28, 2026
2 checks passed
@andiwand
andiwand deleted the landing/10-drop-empty-action-bar branch July 28, 2026 19:07

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: df5948ac5b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

andiwand added a commit that referenced this pull request Jul 28, 2026
Nothing has been left in the options menu: the landing screen carries its
own headers, the open action went away with the direct picker, the ad
removal moved into the settings section and the document's actions moved
down to the buttons by the thumb. What stayed behind is an empty strip of
colour at the top of every screen.

The bar cannot simply be dropped though - it is where the action modes
appear. find, tts and edit are all raised with startSupportActionMode(),
and appcompat puts them in the ActionBar's own container, in place of the
toolbar. So rather than moving to a .NoActionBar theme, MainActivity hides
the bar on start and lets appcompat bring the container back for as long
as a mode is up: checkShowingFlags() shows it whenever an action mode is
showing, whatever the app asked for, and takes it away again when the mode
finishes.

That also leaves the window insets alone. ActionBarOverlayLayout keeps the
system bar insets off the content and reports the toolbar's height on to
the app as an inset of its own, which is what MainActivity's listener pads
main_root with - so the find bar pushes the page down by exactly its own
height, and nothing pads anything while no mode is up. A NoActionBar theme
would swap that decor for a FitWindowsLinearLayout, which pads itself by
the system bars on top of the padding MainActivity already applies.

The fullscreen hide()/show() pair goes with it: with the bar hidden for
good there is nothing left for it to toggle, and show() would have put the
empty bar back on leaving fullscreen.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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