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

PlaybackSupportFragment

public class PlaybackSupportFragment
extends Fragment

java.lang.Object
   ↳ android.support.v4.app.Fragment
     ↳ android.support.v17.leanback.app.PlaybackSupportFragment
Known Direct Subclasses


A fragment for displaying playback controls and related content.

A PlaybackSupportFragment renders the elements of its ObjectAdapter as a set of rows in a vertical list. The Adapter's PresenterSelector must maintain subclasses of RowPresenter.

A playback row is a row rendered by PlaybackRowPresenter. App can call setPlaybackRow(Row) to set playback row for the first element of adapter. App can call setPlaybackRowPresenter(PlaybackRowPresenter) to set presenter for it. setPlaybackRow(Row) and setPlaybackRowPresenter(PlaybackRowPresenter) are optional, app can pass playback row and PlaybackRowPresenter in the adapter using setAdapter(ObjectAdapter).

Auto hide controls upon playing: best practice is calling setControlsOverlayAutoHideEnabled(boolean) upon play/pause. The auto hiding timer will be cancelled upon tickle() triggered by input event.

Summary

Constants

int BG_DARK

A dark translucent background.

int BG_LIGHT

A light translucent background.

int BG_NONE

No background.

Public constructors

PlaybackSupportFragment()

Public methods

void fadeOut()

This method was deprecated in API level 26.1.0. Call hideControlsOverlay(boolean)

ObjectAdapter getAdapter()
int getBackgroundType()

Returns the background type.

ProgressBarManager getProgressBarManager()

Returns the ProgressBarManager that will show or hide progress bar in onBufferingStateChanged(boolean).

void hideControlsOverlay(boolean runAnimation)

Hide controls overlay.

boolean isControlsOverlayAutoHideEnabled()

Returns true if controls will be auto hidden after a delay when fragment is resumed.

boolean isControlsOverlayVisible()

Returns true if controls overlay is visible, f