You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue was drafted by Claude Code under my supervision.
On Android, screens rendered via ScreenFragment (used by tab and drawer navigators) clip child overflow, including box-shadow and elevation shadows, while screens rendered via ScreenStackFragment (native stack) do not. Identical React Native markup produces different visual results depending on the navigator type.
This is the root cause behind #2669 and #2478. The suggested workaround of wrapping content in <View collapsable={false} style={{ flex: 1 }}> works but shouldn't be necessary.
Root Cause
ScreenFragment and ScreenStackFragment wrap screen content in different native Android containers with different clipChildren defaults:
Fragment
Wrapper
Extends
clipChildren default
ScreenFragment
ScreensFrameLayout
FrameLayout
true
ScreenStackFragment
ScreensCoordinatorLayout
CoordinatorLayout
false
FrameLayout defaults to clipChildren = true, clipping any child content that overflows its bounds. CoordinatorLayout defaults to clipChildren = false (by design, to support FABs, snackbars, etc.), so stack screens don't have this issue.
Description
Note
This issue was drafted by Claude Code under my supervision.
On Android, screens rendered via
ScreenFragment(used by tab and drawer navigators) clip child overflow, includingbox-shadowandelevationshadows, while screens rendered viaScreenStackFragment(native stack) do not. Identical React Native markup produces different visual results depending on the navigator type.This is the root cause behind #2669 and #2478. The suggested workaround of wrapping content in
<View collapsable={false} style={{ flex: 1 }}>works but shouldn't be necessary.Root Cause
ScreenFragmentandScreenStackFragmentwrap screen content in different native Android containers with differentclipChildrendefaults:clipChildrendefaultScreenFragmentScreensFrameLayoutFrameLayouttrueScreenStackFragmentScreensCoordinatorLayoutCoordinatorLayoutfalseFrameLayoutdefaults toclipChildren = true, clipping any child content that overflows its bounds.CoordinatorLayoutdefaults toclipChildren = false(by design, to support FABs, snackbars, etc.), so stack screens don't have this issue.Relevant code
ScreenFragment.kt—ScreensFrameLayoutinnerclass (extends
FrameLayout, noclipChildrenoverride)ScreensCoordinatorLayout.kt](https://github.com/software-mansion/react-native-screens/blob/main/android/src/main/java/com/swmansion/rnscreens/stack/views/ScreensCoordinatorLayout.kt) (extends
CoordinatorLayout, inheritsclipChildren = false)Reproduction
box-shadow(e.g. near the top of the screen)borderRadiusSuggested Fix
Set
clipChildren = falseonScreensFrameLayoutto match theCoordinatorLayoutbehavior:Environment