# ActionBar.OnMenuVisibilityListener

Artifact: [androidx.appcompat:appcompat](https://developer.android.com/jetpack/androidx/releases/appcompat) [View Source](https://cs.android.com/search?q=file:androidx/appcompat/app/ActionBar.java+class:androidx.appcompat.app.ActionBar.OnMenuVisibilityListener) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

*** ** * ** ***


```
interface ActionBar.OnMenuVisibilityListener
```

<br />

*** ** * ** ***

Listener for receiving events when action bar menus are shown or hidden.

## Summary

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/appcompat/app/ActionBar.OnMenuVisibilityListener#onMenuVisibilityChanged(boolean)(isVisible: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Called when an action bar menu is shown or hidden. |

## Public functions

### onMenuVisibilityChanged

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/appcompat#1.1.0)

```
fun onMenuVisibilityChanged(isVisible: Boolean): Unit
```

Called when an action bar menu is shown or hidden. Applications may want to use this to tune auto-hiding behavior for the action bar or pause/resume video playback, gameplay, or other activity within the main content area.

| Parameters |
|---|---|
| `isVisible: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | True if an action bar menu is now visible, false if no action bar menus are visible. |