Skip to content

feat(android): large navbar titles that collapse like iOS - #80

Merged
riderx merged 1 commit into
mainfrom
feat/android-large-title
Oct 16, 2026
Merged

riderx merged 1 commit into
mainfrom
feat/android-large-title

Conversation

@riderx

@riderx riderx commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

large was iOS-only; Android ignored it. Now Android shows a large title too.

  • large: true: the bar grows by 52dp (iOS goes 44 → 96, same row) and shows a bold 32sp title under the toolbar row. Toolbar items stay in the top row, like iOS.
  • large: false with the same title: animated collapse (220ms). The bar shrinks, the large title fades out, then the inline toolbar title fades in, so the two never overlap.
  • A different title (new page) snaps; the page transition already animates.
  • Insets (top, navbarHeight) follow the target state so the WebView reflows once, not per frame. Animation frames only resize the navbar container.
  • Screen readers keep reading the toolbar title; the large copy is marked not important for accessibility.
  • Geometry and fade math live in NavbarLargeTitleSupport with unit tests.

Tested in the Mimesis app on an API 36 emulator: tab pages show the large title, scrolling collapses and expands it, tab switches and push pages (back button, no large title) are fine, no crashes. ./gradlew build test, eslint and prettier pass.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

View guided diff Turn on auto-fix

`large: true` now works on Android. The navbar grows by 52dp (same as iOS 44 to 96)
and shows a bold 32sp title in its own row under the toolbar. Sending `large: false`
with the same title collapses it to the inline toolbar title with a 220ms animation:
the bar shrinks, the large title fades out and the inline title fades in. A new title
snaps, since the page transition already animates. Insets follow the target state
so the page moves once, not on every frame.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Beta npm build

Maintainers can publish this PR to npm for fast testing.

Comment /publish-beta after the PR checks are green.

The workflow will:

  • publish a prerelease package on the beta tag
  • add a pinned pr-80 dist-tag for this exact PR build
  • update this comment with the install command

Security note: beta publish is only enabled for branches inside this repository.

@coderabbitai

coderabbitai Bot commented Oct 16, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 44 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 067fe1fb-0743-4b6d-a876-24011836c1e1
📥 Commits

Reviewing files that changed from the base of the PR and between fb29897 and eb05a5e.

📒 Files selected for processing: 5
  • README.md
  • android/src/main/java/app/capgo/nativenavigation/NativeNavigationPlugin.java
  • android/src/main/java/app/capgo/nativenavigation/NavbarLargeTitleSupport.java
  • android/src/test/java/app/capgo/nativenavigation/NavbarLargeTitleSupportTest.java
  • src/definitions.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@riderx
riderx merged commit 368cd16 into main Oct 16, 2026
11 checks passed
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