Make app content flow visually behind the status bar and navigation bar for a full-screen edge-to-edge experience.
Set the status bar to match your app's brand color and switch bar icons between dark and light modes to stay readable.
Handle notched screens and soft keyboard layout conflicts automatically without writing device-specific workarounds.
Control navigation bar appearance inside a Fragment or Dialog independently from the parent Activity.
ImmersionBar is an Android library for controlling the status bar (the thin strip at the top of the screen showing time, battery level, and notifications) and the navigation bar (the row of buttons at the bottom for back, home, and recents). It targets Android version 4.4 and above. When building Android apps, developers often want the app content to flow visually behind these system bars, or want the bar colors to match the app design. ImmersionBar provides a single setup API to configure these bars: you can set them to transparent, pick custom colors, control whether the text and icons inside them appear dark or light, and hide them entirely if needed. The library handles a range of tricky situations that trip up basic Android code: switching between portrait and landscape orientation, notched screens (the camera cutout at the top, as seen on Huawei, Xiaomi, and others), soft keyboard pop-up conflicts where the keyboard covers input fields, and differences between device manufacturers. On phones where Android's standard tools do not allow changing text color in the status bar, the library adapts automatically. It works with the main Android screen building blocks: Activity, Fragment, DialogFragment, Dialog, and PopupWindow. Adding it to a project takes one line in the build file, and the minimum working code is one line of Java or Kotlin. A Kotlin extension module is available for a more natural Kotlin style. The library is at version 3.2.2, distributed via Maven Central, and comes with a downloadable demo app to see the effects on a real device.
← gyf-dev on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.