Stay organized with collections
Save and categorize content based on your preferences.
View.OnSystemUiVisibilityChangeListener
public
static
interface
View.OnSystemUiVisibilityChangeListener
android.view.View.OnSystemUiVisibilityChangeListener
|
This interface was deprecated
in API level 30.
Use WindowInsets.isVisible(int)
to find out about system bar visibilities
by setting a OnApplyWindowInsetsListener
on this view.
Interface definition for a callback to be invoked when the status bar changes
visibility. This reports global changes to the system UI
state, not what the application is requesting.
Summary
Public methods
onSystemUiVisibilityChange
public abstract void onSystemUiVisibilityChange (int visibility)
Called when the status bar changes visibility because of a call to
View.setSystemUiVisibility(int)
.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# View.OnSystemUiVisibilityChangeListener\n\nAdded in [API level 11](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nDeprecated in [API level\n30](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nView.OnSystemUiVisibilityChangeListener\n=======================================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/view/View.OnSystemUiVisibilityChangeListener \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nView.OnSystemUiVisibilityChangeListener\n`\n\n\n`\n\n\n`\n\n|------------------------------------------------------|\n| android.view.View.OnSystemUiVisibilityChangeListener |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\n\n**This interface was deprecated\nin API level 30.** \n\nUse [WindowInsets.isVisible(int)](/reference/android/view/WindowInsets#isVisible(int)) to find out about system bar visibilities\nby setting a [OnApplyWindowInsetsListener](/reference/android/view/View.OnApplyWindowInsetsListener) on this view.\n\nInterface definition for a callback to be invoked when the status bar changes\nvisibility. This reports **global** changes to the system UI\nstate, not what the application is requesting. \n**See also:**\n\n- [View.setOnSystemUiVisibilityChangeListener(android.view.View.OnSystemUiVisibilityChangeListener)](/reference/android/view/View#setOnSystemUiVisibilityChangeListener(android.view.View.OnSystemUiVisibilityChangeListener))\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onSystemUiVisibilityChange](/reference/android/view/View.OnSystemUiVisibilityChangeListener#onSystemUiVisibilityChange(int))`(int visibility) ` Called when the status bar changes visibility because of a call to [View.setSystemUiVisibility(int)](/reference/android/view/View#setSystemUiVisibility(int)). |\n\nPublic methods\n--------------\n\n### onSystemUiVisibilityChange\n\nAdded in [API level 11](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract void onSystemUiVisibilityChange (int visibility)\n```\n\nCalled when the status bar changes visibility because of a call to\n[View.setSystemUiVisibility(int)](/reference/android/view/View#setSystemUiVisibility(int)).\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `visibility` | `int`: Bitwise-or of flags [View.SYSTEM_UI_FLAG_LOW_PROFILE](/reference/android/view/View#SYSTEM_UI_FLAG_LOW_PROFILE), [View.SYSTEM_UI_FLAG_HIDE_NAVIGATION](/reference/android/view/View#SYSTEM_UI_FLAG_HIDE_NAVIGATION), and [View.SYSTEM_UI_FLAG_FULLSCREEN](/reference/android/view/View#SYSTEM_UI_FLAG_FULLSCREEN). This tells you the **global** state of these UI visibility flags, not what your app is currently applying. \u003cbr /\u003e |"]]