Commit ac36c43
Khoroshikh Arkadii
fix(Android, Stack v4): fall back to rootWindowInsets for status bar top when ancestor consumed insets
When an ancestor view (e.g. SafeAreaProvider from react-native-safe-area-context)
consumes the systemBars top inset, unhandledInsets.top becomes 0. As a result,
CustomToolbar computes paddingTop = 0 and the header title renders behind the
status bar on Android 15 (SDK 35) with edge-to-edge enabled.
Fix: for the status bar top height specifically, fall back to rootWindowInsets
when unhandledInsets.top == 0. rootWindowInsets always contains the raw window
insets regardless of what ancestor views have consumed.
This preserves the intent of software-mansion#3240 (use ancestor-received insets when available)
while fixing the regression on setups with SafeAreaProvider wrapping the app.1 parent 840f140 commit ac36c43
1 file changed
Lines changed: 11 additions & 1 deletion
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
171 | 181 | | |
172 | 182 | | |
173 | 183 | | |
174 | | - | |
| 184 | + | |
175 | 185 | | |
176 | 186 | | |
177 | 187 | | |
| |||
0 commit comments