To make a WebView full screen without the status bar, hide the bar natively: get a WindowInsetsControllerCompat for your Activity and call hide(WindowInsetsCompat.Type.statusBars()). Set a swipe behaviour so the bar can return briefly when people need it. Then check that your page isn’t drawn under the bar’s old space, because newer Android versions put content behind it by default.
Three things people mean by “full screen” in a WebView app
“Full screen” in a WebView app can mean three different jobs, and each one is fixed in a different place. Mixing them up is why so many fixes from old answers don’t work.
| What you want | Where it’s controlled | Who triggers it |
|---|---|---|
| No status bar for the whole app | Android code (insets controller) | The app, on launch |
| A video or game going full screen on tap | WebView’s WebChromeClient plus the page’s Fullscreen API |
The user, through the page |
| Page colour running behind a see-through status bar | Edge-to-edge layout plus CSS safe-area insets | The app and the page together |
Most people asking want the first row. Games and video players want the second. If your page already sits behind the clock and battery icons, you have the third, and the fix is padding, not hiding.
How to hide the status bar in a WebView app
The status bar is hidden with Android’s window insets controller, not with HTML. Android’s immersive mode guide uses WindowInsetsControllerCompat.hide() to hide system bars and show() to bring them back.
In your WebView Activity’s onCreate:
val controller = WindowCompat.getInsetsController(window, window.decorView)
controller.systemBarsBehavior =
WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
controller.hide(WindowInsetsCompat.Type.statusBars())
The type you pass picks the bars. Type.statusBars() hides only the status bar, Type.navigationBars() only the navigation bar, and Type.systemBars() both.
Many tutorials still use FLAG_FULLSCREEN or the old SYSTEM_UI_FLAG constants. Ignore them. The current Android docs show the insets controller.
Why the status bar keeps coming back
Hidden system bars always come back on certain gestures, and that’s by design, not a bug. The behaviour constant decides what happens next.
BEHAVIOR_SHOW_BARS_BY_TOUCH: any touch on the screen brings the bars back.BEHAVIOR_SHOW_BARS_BY_SWIPE: a swipe from the edge where the bar was.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE: the bars appear only temporarily, overlay your page, may be partly transparent, and hide again after a short timeout.
The transient option is what people usually mean by “sticky” full screen in a reader, game or kiosk app. A typical case: a quiz app hides the bar, the user swipes down to check a notification, and the bar stays for the rest of the session. That’s the swipe behaviour. Switch to the transient one.
In desktop windowing mode the caption bar stays at the top of the window even in immersive mode.
Fullscreen video and games inside the WebView
A web page’s own fullscreen button only works if the app hands WebView a place to show it. WebView’s onShowCustomView tells the app that the page has entered full screen, and the app should put the provided view in a full screen window.
Skip the override and WebView tells the page fullscreen isn’t supported. That’s why the fullscreen icon on a video does nothing in so many wrapper apps. Override onHideCustomView too, or the page has no way back to the normal WebView.
On the page side, the Fullscreen API needs transient user activation: a tap or other interaction first. Calling element.requestFullscreen() on page load fails, so put it behind a “Play” or “Start game” button. It returns a promise that rejects on error. Catch it and keep the game playable either way.
Game wrappers get their own walkthrough in turning an HTML5 game into an Android app.
Fixing a page that slides under the status bar
On Android 15 and later, your page can end up behind the status bar even when you never asked for full screen. Android’s Android 15 behaviour changes say that for apps targeting API level 35, the status bar is transparent by default and content draws behind it unless insets are applied. setStatusBarColor also has no effect there.
The edge-to-edge guide gives the trigger: target SDK 35 on an Android 15 device. On older versions you opt in with WindowCompat.enableEdgeToEdge(window).
Two ways to stop the overlap:
- Native padding. Read
getInsets(WindowInsetsCompat.Type.systemBars())in an insets listener and set it as padding on the WebView, so the page starts below the bar. - CSS on your site. Add
viewport-fit=coverto the viewport meta tag and pad your header withenv(safe-area-inset-top). The edge-to-edge web guide describes the safe area as four environment variables that define a rectangle.
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<style>
header { padding-top: env(safe-area-inset-top); }
</style>
The CSS route keeps your header colour under the bar, which looks more full screen than hiding anything. It also helps in a regular browser too: from Chrome 135, the viewport can extend into Android’s gesture navigation bar.
Watch display cutouts as well. Apps draw into the cutout by default, and Android 15 treats the SHORT_EDGES, NEVER and DEFAULT cutout modes as ALWAYS for normal windows. A notch can land right on a logo that looked fine on your test phone.
When to keep the status bar
Hiding the status bar is the right call less often than people think. Android’s guide recommends immersive mode for videos, games, image galleries, books and presentation slides, It also warns that users lose easy access to system navigation, so use it only when the benefit goes beyond extra screen space.
For a shop, a booking site or a dashboard, keep the bar and fix the padding with safe-area insets. Customers check the time and their notifications constantly, and a hidden bar just makes a business app feel strange. Full screen belongs to games, readers and kiosk screens.
Blank page after these changes? The WebView white screen checklist covers the usual causes.
Building full screen with Web2Apk
Web2Apk’s customisation covers app name, package name, icon, colour, light or dark theme, drawer or tab navigation, and Website, HTML and Text sections. A full screen or hide-status-bar switch isn’t among those options, so you can’t turn the status bar off from the builder.
You do control the page. The safe-area CSS above lives on your site, so it reaches the app without a rebuild. Changes to name, icon, navigation or bundled HTML need a new build, as the website to APK guide explains. Native immersive mode means editing the Android project yourself; the native app vs WebView post helps you judge whether that’s worth it.
Common mistakes
- Old flags.
FLAG_FULLSCREENcode copied from old answers is outdated. Use the insets controller. - Hiding bars before the window exists. Call the controller in
onCreateof the Activity that shows the WebView. requestFullscreen()on load. Without a user tap, the promise rejects.- No
onHideCustomView. Video enters full screen and the app can’t get back. - One test phone. Check a device with a notch and one with three-button navigation before you publish.
FAQ
How do I hide only the status bar in a WebView app?
Get a WindowInsetsControllerCompat for the Activity window and call hide(WindowInsetsCompat.Type.statusBars()). The navigation bar stays visible. Use systemBars() instead to hide both.
Why does the status bar come back when I swipe down?
Hidden system bars always return on a system gesture. Set the behaviour to BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE so the bars overlay your page briefly and hide again after a short timeout.
Why doesn’t fullscreen video work in my WebView?
WebView only honours a page’s fullscreen request if the app overrides onShowCustomView and onHideCustomView in its WebChromeClient. Without them, WebView tells the page that fullscreen isn’t supported.
Can a web page hide the Android status bar by itself?
Only through the Fullscreen API, and only after a tap or other user interaction, and only if the app supports it through onShowCustomView. A page can’t hide the bar silently on load.
Why is my page hidden under the status bar on Android 15?
Apps that target API level 35 are drawn edge-to-edge on Android 15, so content goes behind a transparent status bar unless insets are applied. Pad the WebView natively or use env(safe-area-inset-top) in CSS.
Sources
- Hide system bars for immersive mode - Android Developers
- Display content edge-to-edge in views - Android Developers
- Behavior changes: Apps targeting Android 15 or higher - Android Developers
- WebChromeClient - Android Developers
- Element: requestFullscreen() method - MDN
- Chrome on Android edge-to-edge migration guide - Chrome for Developers