PlaybackSupportFragmentGlueHost


public class PlaybackSupportFragmentGlueHost extends PlaybackGlueHost implements PlaybackSeekUi

Known direct subclasses

PlaybackGlueHost implementation the interaction between this class and PlaybackSupportFragment.

Summary

Public methods

void

This method is deprecated.

Call hideControlsOverlay

PlaybackGlueHost.PlayerCallback

Implemented by PlaybackGlueHost for responding to player events.

void
hideControlsOverlay(boolean runAnimation)

Hide controls overlay.

boolean

Returns true if auto hides controls overlay.

boolean

Returns true if controls overlay is visible, false otherwise.

void

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

void

Enables or disables controls overlay auto hidden.

void

Sets the host HostCallback callback on the host.

void

Sets the View.OnClickListener on this fragment.

void

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

void

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

void

Sets PlaybackRowPresenter for rendering the playback controls.

void

Interface to be implemented by UI widget to support PlaybackSeekUi.

void
showControlsOverlay(boolean runAnimation)

Show controls overlay.

Inherited methods

From androidx.leanback.media.PlaybackGlueHost
void
setFadingEnabled(boolean enable)

This method is deprecated.

Use setControlsOverlayAutoHideEnabled

Public constructors

PlaybackSupportFragmentGlueHost

Added in 1.1.0
public PlaybackSupportFragmentGlueHost(PlaybackSupportFragment fragment)

Public methods

fadeOut

Added in 1.2.0-alpha04
public void fadeOut()

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 onBufferingStateChanged.

Returns
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.

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

public void setOnActionClickedListener(OnActionClickedListener listener)

Sets the View.OnClickListener on this fragment.

setOnKeyInterceptListener

public void setOnKeyInterceptListener(View.OnKeyListener onKeyListener)

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

public void setPlaybackRow(Row row)

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

setPlaybackRowPresenter

public void setPlaybackRowPresenter(PlaybackRowPresenter presenter)

Sets PlaybackRowPresenter for rendering the playback controls.

setPlaybackSeekUiClient

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