Skip to content

Conversation

@kligarski
Copy link
Contributor

@kligarski kligarski commented Nov 19, 2025

Description

Adds support for SAV in Stack on Android. Fixes handling insets by the header (CustomToolbar).

3405.mp4

Fixes #3398.
Closes https://github.com/software-mansion/react-native-screens-labs/issues/464.

Changes

  • use different insets listener API based on Android SDK (<30/>=30) to correctly handle consuming display cutout inset
  • override ScreensCoordinatorLayout's dispatchApplyWindowInsets to manage order and flow of inset consumption
  • add screenInsets in CustomToolbar to store insets designated for Screen component
  • fix bug with missing menuView in CustomToolbar when used in nested stack
  • add Test3405

Test code and steps to reproduce

Run Test3405.

Checklist

  • Included code example that can be used to test this change
  • Ensured that CI passes

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.

[Android] When stack is wrapped with SafeAreaView, then the insets are still applied to header

3 participants