PlaybackGlueHost
abstract class PlaybackGlueHost
kotlin.Any | |
↳ | androidx.leanback.media.PlaybackGlueHost |
This class represents the UI (e.g. Fragment/Activity) hosting playback controls and defines the interaction between PlaybackGlue
and the host. PlaybackGlueHost provides the following functions:
setPlaybackRow(Row)
, setPlaybackRowPresenter(PlaybackRowPresenter)
. setHostCallback(HostCallback)
. setFadingEnabled(boolean)
. setOnKeyInterceptListener(View.OnKeyListener)
, setOnActionClickedListener(OnActionClickedListener)
. SurfaceHolderGlueHost
to provide SurfaceView for video playback.PlaybackSeekUi
to provide seek UI to gluePlaybackGlue#onAttachedToHost(PlaybackGlueHost)
.
Summary
Nested classes | |
---|---|
abstract |
Callbacks triggered by the host(e.g. fragment) hosting the video controls/surface. |
open |
Optional Client that implemented by PlaybackGlueHost to respond to player event. |
Public constructors | |
---|---|
<init>() This class represents the UI (e.g. Fragment/Activity) hosting playback controls and defines the interaction between |
Public methods | |
---|---|
open Unit |
fadeOut() Fades out the playback overlay immediately. |
open PlaybackGlueHost.PlayerCallback! |
Implemented by PlaybackGlueHost for responding to player events. |
open Unit |
hideControlsOverlay(runAnimation: Boolean) Hide controls overlay. |
open Boolean |
Returns true if auto hides controls overlay. |
open Boolean |
Returns true if controls overlay is visible, false otherwise. |
open Unit |
Notifies host about a change so it can update the view. |
open Unit |
setControlsOverlayAutoHideEnabled(enabled: Boolean) Enables or disables controls overlay auto hidden. |
open Unit |
setFadingEnabled(enable: Boolean) Enables or disables view fading. |
open Unit |
setHostCallback(callback: PlaybackGlueHost.HostCallback!) Sets the host |
open Unit |
setOnActionClickedListener(listener: OnActionClickedListener!) Sets the |
open Unit |
setOnKeyInterceptListener(onKeyListener: OnKeyListener!) Sets the |
open Unit |
setPlaybackRow(row: Row!) Sets the |
open Unit |
setPlaybackRowPresenter(presenter: PlaybackRowPresenter!) Sets |
open Unit |
showControlsOverlay(runAnimation: Boolean) Show controls overlay. |
Public constructors
<init>
PlaybackGlueHost()
This class represents the UI (e.g. Fragment/Activity) hosting playback controls and defines the interaction between PlaybackGlue
and the host. PlaybackGlueHost provides the following functions:
setPlaybackRow(Row)
, setPlaybackRowPresenter(PlaybackRowPresenter)
. setHostCallback(HostCallback)
. setFadingEnabled(boolean)
. setOnKeyInterceptListener(View.OnKeyListener)
, setOnActionClickedListener(OnActionClickedListener)
. SurfaceHolderGlueHost
to provide SurfaceView for video playback.PlaybackSeekUi
to provide seek UI to gluePlaybackGlue#onAttachedToHost(PlaybackGlueHost)
.
Public methods
fadeOut
open funfadeOut(): Unit
Deprecated: Call hideControlsOverlay(boolean)
Fades out the playback overlay immediately.
getPlayerCallback
open fun <