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
Copy file name to clipboardExpand all lines: content/ui/page.md
+104Lines changed: 104 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -267,6 +267,44 @@ Gets or sets the color of the status bar on Android devices. **Android only.**
267
267
268
268
See [Color](/api/class/Color).
269
269
270
+
### androidOverflowEdge
271
+
272
+
```ts
273
+
androidOverflowEdge:
274
+
|'none'
275
+
|'left'
276
+
|'top'
277
+
|'right'
278
+
|'bottom'
279
+
|'dont-apply'
280
+
|'left-dont-consume'
281
+
|'top-dont-consume'
282
+
|'right-dont-consume'
283
+
|'bottom-dont-consume'
284
+
|'all-but-left'
285
+
|'all-but-top'
286
+
|'all-but-right'
287
+
|'all-but-bottom'
288
+
```
289
+
290
+
Controls how Android system insets (status bar, navigation bar, cutouts) are applied and/or consumed by the Page. When insets are applied, they are added to the Page's padding. Insets propagate down the view hierarchy until consumed. Defaults to `'dont-apply'` for Pages. **Android only.**
291
+
292
+
Options:
293
+
294
+
| Value | Behavior |
295
+
|---|---|
296
+
|`none`| Apply and consume all inset edges |
297
+
|`left` / `top` / `right` / `bottom`| Apply and consume only the specified edge |
298
+
|`dont-apply`| Do not apply or consume any insets — triggers `androidOverflowInset`|
299
+
|`left-dont-consume`| Apply the left inset but do not consume it; all other insets are ignored |
300
+
|`top-dont-consume`| Apply the top inset but do not consume it; all other insets are ignored |
301
+
|`right-dont-consume`| Apply the right inset but do not consume it; all other insets are ignored |
302
+
|`bottom-dont-consume`| Apply the bottom inset but do not consume it; all other insets are ignored |
303
+
|`all-but-left`| Apply and consume all insets except left |
304
+
|`all-but-top`| Apply and consume all insets except top |
305
+
|`all-but-right`| Apply and consume all insets except right |
306
+
|`all-but-bottom`| Apply and consume all insets except bottom |
Emitted when `androidOverflowEdge` is set to `'dont-apply'`, allowing manual handling of system insets. You can inspect and modify inset values and explicitly consume individual sides by setting the corresponding `*Consumed` flags. **Android only.**
396
+
397
+
Example:
398
+
399
+
```ts
400
+
page.on('androidOverflowInset', (args) => {
401
+
// Modify inset values if needed
402
+
args.inset.top+=10
403
+
args.inset.bottom+=10
404
+
args.inset.left+=10
405
+
args.inset.right+=10
406
+
407
+
// Explicitly consume each side
408
+
args.inset.topConsumed=true
409
+
args.inset.bottomConsumed=true
410
+
args.inset.leftConsumed=true
411
+
args.inset.rightConsumed=true
412
+
})
413
+
```
414
+
415
+
## Android: Edge-to-Edge tip
416
+
417
+
::: tip Edge-to-Edge on Android
418
+
You can opt into full edge-to-edge and precisely control how system insets are handled on a per-Page basis.
419
+
420
+
- Set `androidOverflowEdge` to choose which inset edges to apply and/or consume. Pages default to `'dont-apply'`.
421
+
- When using `'dont-apply'`, handle `androidOverflowInset` to adjust and explicitly consume sides.
422
+
- Call `Utils.android.enableEdgeToEdge(...)` to enable edge-to-edge and configure light/dark system UI overlays.
423
+
424
+
Example:
425
+
426
+
```ts
427
+
import { Utils } from'@nativescript/core'
428
+
429
+
// Let the page handle insets manually
430
+
page.androidOverflowEdge='dont-apply'
431
+
432
+
// Enable edge-to-edge (Android) with light/dark colors
433
+
import { Application, Color } from'@nativescript/core'
0 commit comments