PlaybackSupportFragmentGlueHost


class PlaybackSupportFragmentGlueHost : PlaybackGlueHost, PlaybackSeekUi

Known direct subclasses

PlaybackGlueHost implementation the interaction between this class and PlaybackSupportFragment.

Summary

Public constructors

Public functions

Unit

This function is deprecated.

Call hideControlsOverlay

PlaybackGlueHost.PlayerCallback!

Implemented by PlaybackGlueHost for responding to player events.

Unit

Hide controls overlay.

Boolean

Returns true if auto hides controls overlay.

Boolean

Returns true if controls overlay is visible, false otherwise.

Unit

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

Unit

Enables or disables controls overlay auto hidden.

Unit

Sets the host HostCallback callback on the host.

Unit

Sets the View.OnClickListener on this fragment.

Unit

Sets the android.view.View.OnKeyListener on the host.

Unit

Sets the Row that represents the information on control items that needs to be rendered.

Unit

Sets PlaybackRowPresenter for rendering the playback controls.

Unit

Interface to be implemented by UI widget to support PlaybackSeekUi.

Unit

Show controls overlay.

Inherited functions

From androidx.leanback.media.PlaybackGlueHost
Unit

This function is deprecated.

Use setControlsOverlayAutoHideEnabled

Public constructors

PlaybackSupportFragmentGlueHost

Added in 1.1.0
PlaybackSupportFragmentGlueHost(fragment: PlaybackSupportFragment!)

Public functions

fadeOut

Added in 1.2.0-alpha04
fun fadeOut(): Unit

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.

Returns
PlaybackGlueHost.PlayerCallback!

PlayerEventCallback that Host supports, null if not supported.

hideControlsOverlay

fun hideControlsOverlay(runAnimation: Boolean): Unit

Hide controls overlay.

Parameters
runAnimation: Boolean

True to run animation, false otherwise.

isControlsOverlayAutoHideEnabled

fun isControlsOverlayAutoHideEnabled(): Boolean

Returns true if auto hides controls overlay.

Returns
Boolean

True if auto hiding controls overlay.

isControlsOverlayVisible

fun isControlsOverlayVisible(): Boolean

Returns true if controls overlay is visible, false otherwise.

Returns
Boolean

True if controls overlay is visible, false otherwise.

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

True to enable auto hidden of controls overlay.

setHostCallback

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

Sets the host HostCallback callback on the host. This method should only be called by PlaybackGlue. App should not directly call this method, app should override onHostStart etc.

setOnActionClickedListener

fun setOnActionClickedListener(listener: OnActionClickedListener!): Unit

Sets the View.OnClickListener on this fragment.

setOnKeyInterceptListener

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

Sets the android.view.View.OnKeyListener on the host. This would trigger the listener when a android.view.KeyEvent is unhandled by the host.

setPlaybackRow

fun setPlaybackRow(row: Row!): Unit

Sets the Row that represents the information on control items that needs to be rendered.

setPlaybackRowPresenter

fun setPlaybackRowPresenter(presenter: PlaybackRowPresenter!): Unit

Sets PlaybackRowPresenter for rendering the playback controls.

setPlaybackSeekUiClient

Added in 1.2.0-alpha04
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

True to run animation, false otherwise.