belongs to Maven artifact com.android.support:leanback-v17:28.0.0-alpha1
Deprecated since version 27.1.0
PlaybackFragment
public
class
PlaybackFragment
extends Fragment
java.lang.Object | ||
↳ | android.app.Fragment | |
↳ | android.support.v17.leanback.app.PlaybackFragment |
![]() |
This class was deprecated
in API level 27.1.0.
use PlaybackSupportFragment
A fragment for displaying playback controls and related content.
A PlaybackFragment 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. |
Inherited constants |
---|
![]()
android.content.ComponentCallbacks2
|
Public constructors | |
---|---|
PlaybackFragment()
|
Public methods | |
---|---|
void
|
fadeOut()
This method was deprecated
in API level 26.1.0.
Call |
ObjectAdapter
|
getAdapter()
|
int
|
|