Display Full-Screen API
Overview
This guide explains how to use specific system APIs to hide the status bar and navigation bar, enabling a full-screen display on Android devices.
Important Considerations
Be aware that using these APIs affects the entire system, not just your application. When you hide the status bar or navigation bar, it remains hidden across all system interfaces and applications.
Permission
The application declares permissions in the manifest.
API Overview
Hide or show status/navigation bar using HideBars
Set status bar and navigation bar state.
Parameters | |
---|---|
state | 1 : hide status bar, 2 : hide navigation bar, 3: hide both, 0: show both. In device without navigation bar, set 2 and 3 will throw IllegalArgumentException. |
Here are some code snippets:
GetBarsVisibility
Get the state of the status bar and navigation bar.
Returns | |
---|---|
int | the result , 1 : hide status bar, 2 : hide navigation bar, 3: hide both, 0: show both. In device without navigation bar, set 2 and 3 will throw IllegalArgumentException. |
Here are some code snippets:
Download
Please download and run HideStatusBar Test APK
Last updated