Stay organized with collections
Save and categorize content based on your preferences.
OnSystemUiVisibilityChangeListener
interface OnSystemUiVisibilityChangeListener
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
abstract fun onSystemUiVisibilityChange(visibility: Int): Unit
Deprecated: Deprecated in Java.
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](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nDeprecated in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nOnSystemUiVisibilityChangeListener\n==================================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/view/View.OnSystemUiVisibilityChangeListener \"View this page in Java\") \n\n```\ninterface OnSystemUiVisibilityChangeListener\n```\n\n|-----------------------------------------------------------|\n| [android.view.View.OnSystemUiVisibilityChangeListener](#) |\n\n*** ** * ** ***\n\n| **This interface was deprecated in API level 30.**\n|\n| Use [WindowInsets.isVisible(int)](/reference/kotlin/android/view/WindowInsets#isVisible(kotlin.Int)) to find out about system bar visibilities by setting a [OnApplyWindowInsetsListener](/reference/kotlin/android/view/View.OnApplyWindowInsetsListener) on this view.\n\nInterface 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.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onSystemUiVisibilityChange](#onSystemUiVisibilityChange(kotlin.Int))`(`visibility:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Called when the status bar changes visibility because of a call to [View.setSystemUiVisibility(int)](/reference/kotlin/android/view/View#setSystemUiVisibility(kotlin.Int)). |\n\nPublic methods\n--------------\n\n### onSystemUiVisibilityChange\n\nAdded in [API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun onSystemUiVisibilityChange(visibility: Int): Unit\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nCalled when the status bar changes visibility because of a call to [View.setSystemUiVisibility(int)](/reference/kotlin/android/view/View#setSystemUiVisibility(kotlin.Int)).\n\n| Parameters ||\n|--------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `visibility` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): Bitwise-or of flags [SYSTEM_UI_FLAG_LOW_PROFILE](/reference/kotlin/android/view/View#SYSTEM_UI_FLAG_LOW_PROFILE:kotlin.Int), [SYSTEM_UI_FLAG_HIDE_NAVIGATION](/reference/kotlin/android/view/View#SYSTEM_UI_FLAG_HIDE_NAVIGATION:kotlin.Int), and [SYSTEM_UI_FLAG_FULLSCREEN](/reference/kotlin/android/view/View#SYSTEM_UI_FLAG_FULLSCREEN:kotlin.Int). This tells you the **global** state of these UI visibility flags, not what your app is currently applying. |"]]