Skip to content

Most visited

Recently visited

navigation
added in version 25.1.0
belongs to Maven artifact com.android.support:leanback-v17:27.0.0

PlaybackFragmentGlueHost

public class PlaybackFragmentGlueHost
extends PlaybackGlueHost implements PlaybackSeekUi

java.lang.Object
   ↳ android.support.v17.leanback.media.PlaybackGlueHost
     ↳ android.support.v17.leanback.app.PlaybackFragmentGlueHost
Known Direct Subclasses


PlaybackGlueHost implementation the interaction between this class and PlaybackFragment.

Summary

Public constructors

PlaybackFragmentGlueHost(PlaybackFragment fragment)

Public methods

void fadeOut()

This method is deprecated. Call hideControlsOverlay(boolean)

PlaybackGlueHost.PlayerCallback getPlayerCallback()

Implemented by PlaybackGlueHost for responding to player events.

void hideControlsOverlay(boolean runAnimation)

Hide controls overlay.

boolean isControlsOverlayAutoHideEnabled()

Returns true if auto hides controls overlay.

boolean isControlsOverlayVisible()

Returns true if controls overlay is visible, false otherwise.

void notifyPlaybackRowChanged()

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

void setControlsOverlayAutoHideEnabled(boolean enabled)

Enables or disables controls overlay auto hidden.

void setHostCallback(PlaybackGlueHost.HostCallback callback)

Sets the host PlaybackGlueHost.HostCallback callback on the host.

void setOnActionClickedListener(OnActionClickedListener listener)

Sets the View.OnClickListener on this fragment.

void setOnKeyInterceptListener(View.OnKeyListener onKeyListener)

Sets the View.OnKeyListener on the host.

void setPlaybackRow(Row row)

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

void setPlaybackRowPresenter(PlaybackRowPresenter presenter)

Sets PlaybackRowPresenter for rendering the playback controls.

void setPlaybackSeekUiClient(PlaybackSeekUi.Client client)

Interface to be implemented by UI widget to support PlaybackSeekUi.

void showControlsOverlay(boolean runAnimation)

Show controls overlay.

Inherited methods

From class android.support.v17.leanback.media.PlaybackGlueHost
From class java.lang.Object
From interface android.support.v17.leanback.widget.PlaybackSeekUi

Public constructors

PlaybackFragmentGlueHost

added in version 25.1.0
PlaybackFragmentGlueHost (PlaybackFragment fragment)

Parameters
fragment PlaybackFragment

Public methods

fadeOut

added in version 25.1.0
void fadeOut ()

This method is deprecated.
Call hideControlsOverlay(boolean)

Fades out the playback overlay immediately.

getPlayerCallback

added in version 26.1.0
PlaybackGlueHost.PlayerCallback getPlayerCallback ()

Implemented by PlaybackGlueHost for responding to player events. Such as showing a spinning wheel progress bar when onBufferingStateChanged(boolean).

Returns
PlaybackGlueHost.PlayerCallback PlayerEventCallback that Host supports, null if not supported.

hideControlsOverlay

added in version 26.1.0
void hideControlsOverlay (boolean runAnimation)

Hide controls overlay.

Parameters
runAnimation boolean: True to run animation, false otherwise.

isControlsOverlayAutoHideEnabled

added in version 26.1.0
boolean isControlsOverlayAutoHideEnabled ()

Returns true if auto hides controls overlay.

Returns
boolean True if auto hiding controls overlay.

isControlsOverlayVisible

added in version 26.1.0
boolean isControlsOverlayVisible ()

Returns true if controls overlay is visible, false otherwise.

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

notifyPlaybackRowChanged

added in version 25.1.0
void notifyPlaybackRowChanged ()

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

setControlsOverlayAutoHideEnabled

added in version 26.1.0
void setControlsOverlayAutoHideEnabled (boolean enabled)

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

added in version 25.1.0
void setHostCallback (PlaybackGlueHost.HostCallback callback)

Sets the host PlaybackGlueHost.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.

Parameters
callback PlaybackGlueHost.HostCallback

setOnActionClickedListener

added in version 25.1.0
void setOnActionClickedListener (OnActionClickedListener listener)

Sets the View.OnClickListener on this fragment.

Parameters
listener OnActionClickedListener

setOnKeyInterceptListener

added in version 25.1.0
void setOnKeyInterceptListener (View.OnKeyListener onKeyListener)

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

Parameters
onKeyListener View.OnKeyListener

setPlaybackRow

added in version 25.1.0
void setPlaybackRow (Row row)

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

Parameters
row Row

setPlaybackRowPresenter

added in version 25.1.0
void setPlaybackRowPresenter (PlaybackRowPresenter presenter)

Sets PlaybackRowPresenter for rendering the playback controls.

Parameters
presenter PlaybackRowPresenter

setPlaybackSeekUiClient

added in version 26.1.0
void setPlaybackSeekUiClient (PlaybackSeekUi.Client client)

Interface to be implemented by UI widget to support PlaybackSeekUi.

Parameters
client PlaybackSeekUi.Client

showControlsOverlay

added in version 26.1.0
void showControlsOverlay (boolean runAnimation)

Show controls overlay.

Parameters
runAnimation boolean: True to run animation, false otherwise.

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Follow Google Developers on WeChat

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience. (Dec 2017 Android Platform & Tools Survey)