added in version 25.1.0
belongs to Maven artifact


public class PlaybackSupportFragment
extends Fragment

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.




A dark translucent background.


A light translucent background.


No background.

Public constructors


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, false otherwise.

boolean isFadingEnabled()

This method was deprecated in API level 26.1.0. Uses