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.