# laobie/statusbarutil

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/laobie-statusbarutil).**

8,758 stars · 1,701 forks · Java · Apache-2.0

## Links

- GitHub: https://github.com/laobie/StatusBarUtil
- Homepage: http://t.cn/Rq746Kb
- awesome-repositories: https://awesome-repositories.com/repository/laobie-statusbarutil.md

## Topics

`android` `statusbar` `statusbarutil` `utils`

## Description

StatusBarUtil is an Android library that provides comprehensive control over the status bar's appearance, enabling developers to customize its color, transparency, and icon style. The library handles the underlying complexity of Android window flag manipulation and API-level conditional logic, applying the correct styling technique based on the device's Android version for broad compatibility.

The library distinguishes itself through specialized integrations with common Android UI patterns. It coordinates status bar transparency with DrawerLayout's fitsSystemWindows flag for seamless drawer overlays, binds styling to fragment lifecycles, and synchronizes transparency with ImageView headers for immersive content layouts. It also preserves status bar color during swipe-back activity transitions and supports toggling between light and dark icon modes.

Beyond these integrations, StatusBarUtil offers granular control over status bar opacity through alpha-based translucency adjustments, allowing developers to set custom transparency levels or make the status bar fully transparent for full-screen experiences. The library supports applying these changes within individual fragments rather than only at the activity level, and provides straightforward methods for setting status bar colors on devices running Android 4.4 and above.

## Tags

### User Interface & Experience

- [Android System Bar Stylers](https://awesome-repositories.com/f/user-interface-experience/android-system-bar-stylers.md) — Provides comprehensive control over Android status bar color, transparency, and icon style customization.
- [Status Bar Icon Mode Toggles](https://awesome-repositories.com/f/user-interface-experience/presentation-frameworks/theme-systems/dark-mode-strategies/separate-light-and-dark-palettes/status-bar-icon-mode-toggles.md) — Switches status bar icon and text color between light and dark modes using system UI visibility flags.
- [Status Bar Light/Dark Mode Toggles](https://awesome-repositories.com/f/user-interface-experience/presentation-frameworks/theme-systems/dark-mode-strategies/separate-light-and-dark-palettes/status-bar-light-dark-mode-toggles.md) — Switches the status bar text and icons between light and dark appearances to suit different backgrounds.
- [Fragment-Based Bar Orchestration](https://awesome-repositories.com/f/user-interface-experience/status-bar-lifecycle-management/fragment-based-bar-orchestration.md) — Binds status bar styling to fragment lifecycle by accessing the hosting activity's window from fragment context.
- [Immersive](https://awesome-repositories.com/f/user-interface-experience/status-bars/immersive.md) — Makes the status bar transparent or translucent so app content displays behind it for a full-screen experience.
- [Status Bar Customizers](https://awesome-repositories.com/f/user-interface-experience/status-bars/status-bar-customizers.md) — An Android library for customizing status bar appearance including color, transparency, and icon style.
- [Opacity Adjustments](https://awesome-repositories.com/f/user-interface-experience/status-bars/status-bar-customizers/opacity-adjustments.md) — Provides alpha-based translucency control for customizing status bar opacity. ([source](http://laobie.github.io/android/2016/03/27/statusbar-util.html))
- [Status Bar Color Changes](https://awesome-repositories.com/f/user-interface-experience/status-bars/status-bar-customizers/status-bar-color-changes.md) — Changes the status bar background to any color on devices running Android 4.4 and above. ([source](http://t.cn/Rq746Kb))
- [Status Bar Color Settings](https://awesome-repositories.com/f/user-interface-experience/status-bars/status-bar-customizers/status-bar-color-settings.md) — Changes the status bar background to a specified color value. ([source](https://cdn.jsdelivr.net/gh/laobie/statusbarutil@master/README.md))
- [Status Bar Light/Dark Mode Toggles](https://awesome-repositories.com/f/user-interface-experience/status-bars/status-bar-customizers/status-bar-light-dark-mode-toggles.md) — Switches the status bar text and icons between light and dark appearances. ([source](https://cdn.jsdelivr.net/gh/laobie/statusbarutil@master/README.md))
- [Translucency Toggles](https://awesome-repositories.com/f/user-interface-experience/status-bars/status-bar-customizers/translucency-toggles.md) — Ships a toggle to switch the status bar between translucent and opaque modes. ([source](http://t.cn/Rq746Kb))
- [Translucent Modes](https://awesome-repositories.com/f/user-interface-experience/status-bars/status-bar-customizers/translucent-modes.md) — Implements a translucent status bar mode for semi-transparent content display. ([source](http://laobie.github.io/android/2016/03/27/statusbar-util.html))
- [Translucent Settings](https://awesome-repositories.com/f/user-interface-experience/status-bars/status-bar-customizers/translucent-settings.md) — Provides a setting to make the status bar semi-transparent for content visibility. ([source](https://cdn.jsdelivr.net/gh/laobie/statusbarutil@master/README.md))
- [Transparency Adjustments](https://awesome-repositories.com/f/user-interface-experience/status-bars/status-bar-customizers/transparency-adjustments.md) — Offers transparency adjustments for the status bar to reveal content behind it. ([source](http://t.cn/Rq746Kb))
- [Transparent Modes](https://awesome-repositories.com/f/user-interface-experience/status-bars/status-bar-customizers/transparent-modes.md) — Provides a transparent status bar mode for immersive full-screen experiences. ([source](http://laobie.github.io/android/2016/03/27/statusbar-util.html))
- [Transparent Settings](https://awesome-repositories.com/f/user-interface-experience/status-bars/status-bar-customizers/transparent-settings.md) — Provides a setting to make the status bar fully transparent for immersive content. ([source](https://cdn.jsdelivr.net/gh/laobie/statusbarutil@master/README.md))
- [ImageView Header Transparency Syncs](https://awesome-repositories.com/f/user-interface-experience/floating-window-components/transparency-controls/transparency-visualization/imageview-header-transparency-syncs.md) — Synchronizes status bar transparency with ImageView headers for immersive content layouts.
- [DrawerLayout Status Bar Integrations](https://awesome-repositories.com/f/user-interface-experience/status-bars/desktop-environment-status-bar-integrations/drawerlayout-status-bar-integrations.md) — Coordinates status bar color and transparency with screens that include a navigation drawer layout.
- [DrawerLayout Status Bar Stylings](https://awesome-repositories.com/f/user-interface-experience/status-bars/status-bar-customizers/drawerlayout-status-bar-stylings.md) — Applies status bar color or transparency on screens that include a DrawerLayout. ([source](http://laobie.github.io/android/2016/03/27/statusbar-util.html))
- [Image Header Status Bar Stylings](https://awesome-repositories.com/f/user-interface-experience/status-bars/status-bar-customizers/image-header-status-bar-stylings.md) — Sets the status bar transparent on screens using an ImageView as the header. ([source](http://laobie.github.io/android/2016/03/27/statusbar-util.html))
- [Swipe-Back Color Preservations](https://awesome-repositories.com/f/user-interface-experience/status-bars/status-bar-customizers/system-bar-visual-styling/swipe-back-color-preservations.md) — Preserves status bar color during swipe-back activity transitions. ([source](http://laobie.github.io/android/2016/03/27/statusbar-util.html))
- [DrawerLayout Edge-to-Edge Integrations](https://awesome-repositories.com/f/user-interface-experience/terminal-user-interfaces/layout-structural-components/interface-display-modes/full-screen-modes/edge-to-edge-layouts/drawerlayout-edge-to-edge-integrations.md) — Coordinates status bar transparency with DrawerLayout's fitsSystemWindows flag for seamless drawer overlays.

### Development Tools & Productivity

- [Window Flag Modifications](https://awesome-repositories.com/f/development-tools-productivity/feature-flags/system-flag-unlocking/window-flag-modifications.md) — Modifies system window flags to control status bar translucency, transparency, and color across Android API levels.

### Graphics & Multimedia

- [Status Bar Alpha Adjustments](https://awesome-repositories.com/f/graphics-multimedia/transparency-flattening/alpha-channel-removal/alpha-preservation/status-bar-alpha-adjustments.md) — Provides granular alpha-based translucency control for the Android status bar via window background manipulation.
- [Swipe-Back Status Bar Color Preservations](https://awesome-repositories.com/f/graphics-multimedia/color-preservation/swipe-back-status-bar-color-preservations.md) — Preserves status bar color during swipe-back activity transitions by intercepting window decor changes.

### Mobile Development

- [Status Bar API Version Selectors](https://awesome-repositories.com/f/mobile-development/android-emulator-orchestration/android-api-level-selectors/status-bar-api-version-selectors.md) — Applies different status bar styling techniques based on the device's Android version for broad compatibility.

### Part of an Awesome List

- [System Bars](https://awesome-repositories.com/f/awesome-lists/devtools/system-bars.md) — Status bar customization utility.
