# PlaybackSupportFragmentGlueHost

# PlaybackSupportFragmentGlueHost

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

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/leanback/app/PlaybackSupportFragmentGlueHost "View this page in Java")

<br />

```
class PlaybackSupportFragmentGlueHost : PlaybackGlueHost, PlaybackSeekUi
```

<br />

|---|---|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)                                                                                  |||
| ↳ | [androidx.leanback.media.PlaybackGlueHost](https://developer.android.com/reference/kotlin/androidx/leanback/media/PlaybackGlueHost)                              ||
|   | ↳ | [androidx.leanback.app.PlaybackSupportFragmentGlueHost](https://developer.android.com/reference/kotlin/androidx/leanback/app/PlaybackSupportFragmentGlueHost) |

Known direct subclasses  
[VideoSupportFragmentGlueHost](https://developer.android.com/reference/kotlin/androidx/leanback/app/VideoSupportFragmentGlueHost)  

|-----------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [VideoSupportFragmentGlueHost](https://developer.android.com/reference/kotlin/androidx/leanback/app/VideoSupportFragmentGlueHost) | [PlaybackGlueHost](https://developer.android.com/reference/kotlin/androidx/leanback/media/PlaybackGlueHost)implementation the interaction between[PlaybackGlue](https://developer.android.com/reference/kotlin/androidx/leanback/media/PlaybackGlue)and[VideoSupportFragment](https://developer.android.com/reference/kotlin/androidx/leanback/app/VideoSupportFragment). |

*** ** * ** ***

[PlaybackGlueHost](https://developer.android.com/reference/kotlin/androidx/leanback/media/PlaybackGlueHost)implementation the interaction between this class and[PlaybackSupportFragment](https://developer.android.com/reference/kotlin/androidx/leanback/app/PlaybackSupportFragment).

## Summary

|                                                                                                                                                                    ### Public constructors                                                                                                                                                                     |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [PlaybackSupportFragmentGlueHost](https://developer.android.com/reference/kotlin/androidx/leanback/app/PlaybackSupportFragmentGlueHost#PlaybackSupportFragmentGlueHost(androidx.leanback.app.PlaybackSupportFragment))`(fragment: `[PlaybackSupportFragment](https://developer.android.com/reference/kotlin/androidx/leanback/app/PlaybackSupportFragment)`!)` |

|                                                             ### Public functions                                                             |
|----------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                | [fadeOut](https://developer.android.com/reference/kotlin/androidx/leanback/app/PlaybackSupportFragmentGlueHost#fadeOut())`()` **This function is deprecated.** Call[hideControlsOverlay](https://developer.android.com/reference/kotlin/androidx/leanback/media/PlaybackGlueHost#hideControlsOverlay(boolean)) <br />                                                                                                                                                                                       |
| [PlaybackGlueHost.PlayerCallback](https://developer.android.com/reference/kotlin/androidx/leanback/media/PlaybackGlueHost.PlayerCallback)`!` | [getPlayerCallback](https://developer.android.com/reference/kotlin/androidx/leanback/app/PlaybackSupportFragmentGlueHost#getPlayerCallback())`()` Implemented by PlaybackGlueHost for responding to player events.                                                                                                                                                                                                                                                                                          |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                | [hideControlsOverlay](https://developer.android.com/reference/kotlin/androidx/leanback/app/PlaybackSupportFragmentGlueHost#hideControlsOverlay(boolean))`(runAnimation: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`)` Hide controls overlay.                                                                                                                                                                                                                      |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                                          | [isControlsOverlayAutoHideEnabled](https://developer.android.com/reference/kotlin/androidx/leanback/app/PlaybackSupportFragmentGlueHost#isControlsOverlayAutoHideEnabled())`()` Returns true if auto hides controls overlay.                                                                                                                                                                                                                                                                                |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                                          | [isControlsOverlayVisible](https://developer.android.com/reference/kotlin/androidx/leanback/app/PlaybackSupportFragmentGlueHost#isControlsOverlayVisible())`()` Returns true if controls overlay is visible, false otherwise.                                                                                                                                                                                                                                                                               |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                | [notifyPlaybackRowChanged](https://developer.android.com/reference/kotlin/androidx/leanback/app/PlaybackSupportFragmentGlueHost#notifyPlaybackRowChanged())`()` Notifies host about a change so it can update the view.                                                                                                                                                                                                                                                                                     |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                | [setControlsOverlayAutoHideEnabled](https://developer.android.com/reference/kotlin/androidx/leanback/app/PlaybackSupportFragmentGlueHost#setControlsOverlayAutoHideEnabled(boolean))`(enabled: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`)` Enables or disables controls overlay auto hidden.                                                                                                                                                                    |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                | [setHostCallback](https://developer.android.com/reference/kotlin/androidx/leanback/app/PlaybackSupportFragmentGlueHost#setHostCallback(androidx.leanback.media.PlaybackGlueHost.HostCallback))`(callback: `[PlaybackGlueHost.HostCallback](https://developer.android.com/reference/kotlin/androidx/leanback/media/PlaybackGlueHost.HostCallback)`!)` Sets the host[HostCallback](https://developer.android.com/reference/kotlin/androidx/leanback/media/PlaybackGlueHost.HostCallback)callback on the host. |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                | [setOnActionClickedListener](https://developer.android.com/reference/kotlin/androidx/leanback/app/PlaybackSupportFragmentGlueHost#setOnActionClickedListener(androidx.leanback.widget.OnActionClickedListener))`(listener: `[OnActionClickedListener](https://developer.android.com/reference/kotlin/androidx/leanback/widget/OnActionClickedListener)`!)` Sets the[View.OnClickListener](https://developer.android.com/reference/android/view/View.OnClickListener.html)on this fragment.                  |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                | [setOnKeyInterceptListener](https://developer.android.com/reference/kotlin/androidx/leanback/app/PlaybackSupportFragmentGlueHost#setOnKeyInterceptListener(android.view.View.OnKeyListener))`(onKeyListener: `[View.OnKeyListener](https://developer.android.com/reference/android/view/View.OnKeyListener.html)`!)` Sets the[android.view.View.OnKeyListener](https://developer.android.com/reference/android/view/View.OnKeyListener.html)on the host.                                                    |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                | [setPlaybackRow](https://developer.android.com/reference/kotlin/androidx/leanback/app/PlaybackSupportFragmentGlueHost#setPlaybackRow(androidx.leanback.widget.Row))`(row: `[Row](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Row)`!)` Sets the[Row](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Row)that represents the information on control items that needs to be rendered.                                                                     |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                | [setPlaybackRowPresenter](https://developer.android.com/reference/kotlin/androidx/leanback/app/PlaybackSupportFragmentGlueHost#setPlaybackRowPresenter(androidx.leanback.widget.PlaybackRowPresenter))`(presenter: `[PlaybackRowPresenter](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackRowPresenter)`!)` Sets[PlaybackRowPresenter](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackRowPresenter)for rendering the playback controls.   |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                | [setPlaybackSeekUiClient](https://developer.android.com/reference/kotlin/androidx/leanback/app/PlaybackSupportFragmentGlueHost#setPlaybackSeekUiClient(androidx.leanback.widget.PlaybackSeekUi.Client))`(client: `[PlaybackSeekUi.Client](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackSeekUi.Client)`!)` Interface to be implemented by UI widget to support PlaybackSeekUi.                                                                                            |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                | [showControlsOverlay](https://developer.android.com/reference/kotlin/androidx/leanback/app/PlaybackSupportFragmentGlueHost#showControlsOverlay(boolean))`(runAnimation: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`)` Show controls overlay.                                                                                                                                                                                                                      |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           ### Inherited functions                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From[androidx.leanback.media.PlaybackGlueHost](https://developer.android.com/reference/kotlin/androidx/leanback/media/PlaybackGlueHost) |-------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | ~~[setFadingEnabled](https://developer.android.com/reference/kotlin/androidx/leanback/media/PlaybackGlueHost#setFadingEnabled(boolean))~~`(enable: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`)` **This function is deprecated.** Use[setControlsOverlayAutoHideEnabled](https://developer.android.com/reference/kotlin/androidx/leanback/media/PlaybackGlueHost#setControlsOverlayAutoHideEnabled(boolean)) <br /> | |

## Public constructors

### PlaybackSupportFragmentGlueHost

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

```
PlaybackSupportFragmentGlueHost(fragment: PlaybackSupportFragment!)
```  

## Public functions

### fadeOut

```
fun fadeOut(): Unit
```
| **This function is deprecated.**   
|
| Call[hideControlsOverlay](https://developer.android.com/reference/kotlin/androidx/leanback/media/PlaybackGlueHost#hideControlsOverlay(boolean))

Fades out the playback overlay immediately.  

### getPlayerCallback

```
fun getPlayerCallback(): PlaybackGlueHost.PlayerCallback!
```

Implemented by PlaybackGlueHost for responding to player events. Such as showing a spinning wheel progress bar when[onBufferingStateChanged](https://developer.android.com/reference/kotlin/androidx/leanback/media/PlaybackGlueHost.PlayerCallback#onBufferingStateChanged(boolean)).  

|                                                                   Returns                                                                    |
|----------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------|
| [PlaybackGlueHost.PlayerCallback](https://developer.android.com/reference/kotlin/androidx/leanback/media/PlaybackGlueHost.PlayerCallback)`!` | PlayerEventCallback that Host supports, null if not supported. |

### hideControlsOverlay

```
fun hideControlsOverlay(runAnimation: Boolean): Unit
```

Hide controls overlay.  

|                                             Parameters                                              |
|-----------------------------------------------------------------------------------------------------|-----------------------------------------|
| `runAnimation: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | True to run animation, false otherwise. |

### isControlsOverlayAutoHideEnabled

```
fun isControlsOverlayAutoHideEnabled(): Boolean
```

Returns true if auto hides controls overlay.  

|                                       Returns                                       |
|-------------------------------------------------------------------------------------|---------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | True if auto hiding controls overlay. |

### isControlsOverlayVisible

```
fun isControlsOverlayVisible(): Boolean
```

Returns true if controls overlay is visible, false otherwise.  

|                                       Returns                                       |
|-------------------------------------------------------------------------------------|-------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | True if controls overlay is visible, false otherwise. |

|                                                                  See also                                                                   |
|---------------------------------------------------------------------------------------------------------------------------------------------|---|
| [showControlsOverlay](https://developer.android.com/reference/kotlin/androidx/leanback/media/PlaybackGlueHost#showControlsOverlay(boolean)) |   |
| [hideControlsOverlay](https://developer.android.com/reference/kotlin/androidx/leanback/media/PlaybackGlueHost#hideControlsOverlay(boolean)) |   |

### notifyPlaybackRowChanged

```
fun notifyPlaybackRowChanged(): Unit
```

Notifies host about a change so it can update the view.  

### setControlsOverlayAutoHideEnabled

```
fun setControlsOverlayAutoHideEnabled(enabled: Boolean): Unit
```

Enables or disables controls overlay auto hidden. If enabled, the view will be faded out after a time period.  

|                                           Parameters                                           |
|------------------------------------------------------------------------------------------------|-------------------------------------------------|
| `enabled: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | True to enable auto hidden of controls overlay. |

### setHostCallback

```
fun setHostCallback(callback: PlaybackGlueHost.HostCallback!): Unit
```

Sets the host[HostCallback](https://developer.android.com/reference/kotlin/androidx/leanback/media/PlaybackGlueHost.HostCallback)callback on the host. This method should only be called by[PlaybackGlue](https://developer.android.com/reference/kotlin/androidx/leanback/media/PlaybackGlue). App should not directly call this method, app should override[onHostStart](https://developer.android.com/reference/kotlin/androidx/leanback/media/PlaybackGlue#onHostStart())etc.  

### setOnActionClickedListener

```
fun setOnActionClickedListener(listener: OnActionClickedListener!): Unit
```

Sets the[View.OnClickListener](https://developer.android.com/reference/android/view/View.OnClickListener.html)on this fragment.  

### setOnKeyInterceptListener

```
fun setOnKeyInterceptListener(onKeyListener: View.OnKeyListener!): Unit
```

Sets the[android.view.View.OnKeyListener](https://developer.android.com/reference/android/view/View.OnKeyListener.html)on the host. This would trigger the listener when a[android.view.KeyEvent](https://developer.android.com/reference/android/view/KeyEvent.html)is unhandled by the host.  

### setPlaybackRow

```
fun setPlaybackRow(row: Row!): Unit
```

Sets the[Row](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Row)that represents the information on control items that needs to be rendered.  

### setPlaybackRowPresenter

```
fun setPlaybackRowPresenter(presenter: PlaybackRowPresenter!): Unit
```

Sets[PlaybackRowPresenter](https://developer.android.com/reference/kotlin/androidx/leanback/widget/PlaybackRowPresenter)for rendering the playback controls.  

### setPlaybackSeekUiClient

```
fun setPlaybackSeekUiClient(client: PlaybackSeekUi.Client!): Unit
```

Interface to be implemented by UI widget to support PlaybackSeekUi.  

### showControlsOverlay

```
fun showControlsOverlay(runAnimation: Boolean): Unit
```

Show controls overlay.  

|                                             Parameters                                              |
|-----------------------------------------------------------------------------------------------------|-----------------------------------------|
| `runAnimation: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | True to run animation, false otherwise. |