How can I get the Safe Area insets?

43 views
Skip to first unread message

Ferhat

unread,
Aug 1, 2026, 3:33:48 PM (7 days ago) Aug 1
to DroidScript
Hi. Is there any way in DroidScript to get the Android safe area (WindowInsets), including the top and bottom insets in pixels?
app.GetNavBarHeight() exists, but I couldn't find a way to get the safe area or the status bar inset.
On gesture navigation devices, my WebView content extends underneath the system navigation area, so some UI elements end up being covered by the gesture/navigation bar.
Is there a built-in API for retrieving the safe area insets, or is there another recommended way to handle this?

Alan Hendry

unread,
Aug 6, 2026, 3:07:08 PM (2 days ago) Aug 6
to DroidScript
HI,
If this an html project it may well be worth looking at the html
    <meta name="viewport" content="width=device-width">
Regards, ah

Ferhat

unread,
1:22 PM (3 hours ago) 1:22 PM
to DroidScript

Thanks for the suggestion. I already have the viewport meta tag set, but unfortunately it doesn't provide the Android WindowInsets or the actual status/navigation bar inset values.

The issue specifically occurs with gesture navigation, where the WebView content can extend into the system gesture area. I'm looking for a way in DroidScript to get the top/bottom safe-area insets in pixels, or another recommended way to prevent WebView content from being covered.


6 Ağustos 2026 Perşembe tarihinde saat 22:07:08 UTC+3 itibarıyla hendr...@gmail.com şunları yazdı:
Reply all
Reply to author
Forward
0 new messages