# 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)

*** ** * ** ***


```
public class PlaybackSupportFragmentGlueHost extends PlaybackGlueHost implements PlaybackSeekUi
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.leanback.media.PlaybackGlueHost](https://developer.android.com/reference/androidx/leanback/media/PlaybackGlueHost) ||
|   | ↳ | [androidx.leanback.app.PlaybackSupportFragmentGlueHost](https://developer.android.com/reference/androidx/leanback/app/PlaybackSupportFragmentGlueHost) |

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

|---|---|
| `https://developer.android.com/reference/androidx/leanback/app/VideoSupportFragmentGlueHost` | `https://developer.android.com/reference/androidx/leanback/media/PlaybackGlueHost` implementation the interaction between `https://developer.android.com/reference/androidx/leanback/media/PlaybackGlue` and `https://developer.android.com/reference/androidx/leanback/app/VideoSupportFragment`. |

*** ** * ** ***

`https://developer.android.com/reference/androidx/leanback/media/PlaybackGlueHost` implementation the interaction between this class and `https://developer.android.com/reference/androidx/leanback/app/PlaybackSupportFragment`.

## Summary

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

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

| ### Inherited methods |
|---|
| From [androidx.leanback.media.PlaybackGlueHost](https://developer.android.com/reference/androidx/leanback/media/PlaybackGlueHost) |---|---| | `void` | `[setFadingEnabled](https://developer.android.com/reference/androidx/leanback/media/PlaybackGlueHost#setFadingEnabled(boolean))(boolean enable)` **This method is deprecated.** Use `https://developer.android.com/reference/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)

```
public PlaybackSupportFragmentGlueHost(PlaybackSupportFragment fragment)
```

## Public methods

### fadeOut

```
public void fadeOut()
```

> [!CAUTION]
> **This method is deprecated.**   
>
> Call `https://developer.android.com/reference/androidx/leanback/media/PlaybackGlueHost#hideControlsOverlay(boolean)`

Fades out the playback overlay immediately.

### getPlayerCallback

```
public PlaybackGlueHost.PlayerCallback getPlayerCallback()
```

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

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

### hideControlsOverlay

```
public void hideControlsOverlay(boolean runAnimation)
```

Hide controls overlay.

| Parameters |
|---|---|
| `boolean runAnimation` | True to run animation, false otherwise. |

### isControlsOverlayAutoHideEnabled

```
public boolean isControlsOverlayAutoHideEnabled()
```

Returns true if auto hides controls overlay.

| Returns |
|---|---|
| `boolean` | True if auto hiding controls overlay. |

### isControlsOverlayVisible

```
public boolean isControlsOverlayVisible()
```

Returns true if controls overlay is visible, false otherwise.

| Returns |
|---|---|
| `boolean` | True if controls overlay is visible, false otherwise. |

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

### notifyPlaybackRowChanged

```
public void notifyPlaybackRowChanged()
```

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

### setControlsOverlayAutoHideEnabled

```
public void setControlsOverlayAutoHideEnabled(boolean enabled)
```

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

| Parameters |
|---|---|
| `boolean enabled` | True to enable auto hidden of controls overlay. |

### setHostCallback

```
public void setHostCallback(PlaybackGlueHost.HostCallback callback)
```

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

### setOnActionClickedListener

```
public void setOnActionClickedListener(OnActionClickedListener listener)
```

Sets the `https://developer.android.com/reference/android/view/View.OnClickListener.html` on this fragment.

### setOnKeyInterceptListener

```
public void setOnKeyInterceptListener(View.OnKeyListener onKeyListener)
```

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

### setPlaybackRow

```
public void setPlaybackRow(Row row)
```

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

### setPlaybackRowPresenter

```
public void setPlaybackRowPresenter(PlaybackRowPresenter presenter)
```

Sets `https://developer.android.com/reference/androidx/leanback/widget/PlaybackRowPresenter` for rendering the playback controls.

### setPlaybackSeekUiClient

```
public void setPlaybackSeekUiClient(PlaybackSeekUi.Client client)
```

Interface to be implemented by UI widget to support PlaybackSeekUi.

### showControlsOverlay

```
public void showControlsOverlay(boolean runAnimation)
```

Show controls overlay.

| Parameters |
|---|---|
| `boolean runAnimation` | True to run animation, false otherwise. |