# LegacyPlayerControlView.VisibilityListener

# LegacyPlayerControlView.VisibilityListener

Artifact: [androidx.media3:media3-ui](https://developer.android.com/jetpack/androidx/releases/media3)  
[View Source](https://cs.android.com/search?q=file:androidx/media3/ui/LegacyPlayerControlView.java+class:androidx.media3.ui.LegacyPlayerControlView.VisibilityListener)

*** ** * ** ***

Kotlin \|[Java](https://developer.android.com/reference/androidx/media3/ui/LegacyPlayerControlView.VisibilityListener "View this page in Java")


```
interface LegacyPlayerControlView.VisibilityListener
```

<br />

*** ** * ** ***

Listener to be notified about changes of the visibility of the UI control.

## Summary

|                             ### Public functions                              |
|-------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [onVisibilityChange](https://developer.android.com/reference/kotlin/androidx/media3/ui/LegacyPlayerControlView.VisibilityListener#onVisibilityChange(int))`(visibility: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Called when the visibility changes. |

## Public functions

### onVisibilityChange

```
fun onVisibilityChange(visibility: Int): Unit
```

Called when the visibility changes.  

|                                        Parameters                                         |
|-------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `visibility: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | The new visibility. Either [VISIBLE](https://developer.android.com/reference/android/view/View.html#VISIBLE()) or [GONE](https://developer.android.com/reference/android/view/View.html#GONE()). |