VideoFragment

Added in 1.1.0
Deprecated in 1.1.0

class VideoFragment : PlaybackFragment


Subclass of PlaybackFragment that is responsible for providing a SurfaceView and rendering video. See base class PlaybackFragment for how to setup controls and how to customize showing/hiding controls.

Summary

Public constructors

Public functions

SurfaceView!

Returns the surface view.

View?
onCreateView(
    inflater: LayoutInflater!,
    container: ViewGroup?,
    savedInstanceState: Bundle!
)

This function is deprecated.

Unit

This function is deprecated.

Unit

Adds SurfaceHolder.Callback to android.view.SurfaceView.

Protected functions

Unit
onVideoSizeChanged(videoWidth: Int, videoHeight: Int)

Called when size of the video changes.

Inherited Constants

From android.content.ComponentCallbacks2
From androidx.leanback.app.PlaybackFragment
const Int

A dark translucent background.

const Int

A light translucent background.

const Int

No background.

Inherited functions

From android.app.Fragment
Unit
dump(
    prefix: String!,
    fd: FileDescriptor!,
    writer: PrintWriter!,
    args: Array<String!>!
)

This function is deprecated.

Boolean
equals(o: Any!)

This function is deprecated.

Activity!

This function is deprecated.

Boolean

This function is deprecated.

Boolean

This function is deprecated.

Bundle!

This function is deprecated.

FragmentManager!

This function is deprecated.

Context!

This function is deprecated.

Transition!

This function is deprecated.

Transition!

This function is deprecated.

FragmentManager!

This function is deprecated.

Any!

This function is deprecated.

Int

This function is deprecated.

LayoutInflater!

This function is deprecated.

LoaderManager!

This function is deprecated.

Fragment!

This function is deprecated.

Transition!

This function is deprecated.

Resources!

This function is deprecated.

Boolean

This function is deprecated.

Transition!

This function is deprecated.

Transition!

This function is deprecated.

Transition!

This function is deprecated.

String!
getString(resId: Int)

This function is deprecated.

String!

This function is deprecated.

Fragment!

This function is deprecated.

Int

This function is deprecated.

CharSequence!
getText(resId: Int)

This function is deprecated.

Boolean

This function is deprecated.

View!

This function is deprecated.

Int

This function is deprecated.

java-static Fragment!
instantiate(context: Context!, fname: String!)

This function is deprecated.

Boolean

This function is deprecated.

Boolean

This function is deprecated.

Boolean

This function is deprecated.

Boolean

This function is deprecated.

Boolean

This function is deprecated.

Boolean

This function is deprecated.

Boolean

This function is deprecated.

Boolean

This function is deprecated.

Unit
onActivityCreated(savedInstanceState: Bundle!)

This function is deprecated.

Unit
onActivityResult(requestCode: Int, resultCode: Int, data: Intent!)

This function is deprecated.

Unit
onAttach(context: Context!)

This function is deprecated.

Unit
onAttachFragment(childFragment: Fragment!)

This function is deprecated.

Unit

This function is deprecated.

Boolean

This function is deprecated.

Unit
onCreate(savedInstanceState: Bundle!)

This function is deprecated.

Animator!
onCreateAnimator(transit: Int, enter: Boolean, nextAnim: Int)

This function is deprecated.

Unit
onCreateContextMenu(
    menu: ContextMenu!,
    v: View!,
    menuInfo: ContextMenu.ContextMenuInfo!
)

This function is deprecated.

Unit
onCreateOptionsMenu(menu: Menu!, inflater: MenuInflater!)

This function is deprecated.

View!
onCreateView(
    inflater: LayoutInflater!,
    container: ViewGroup!,
    savedInstanceState: Bundle!
)

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

LayoutInflater!
onGetLayoutInflater(savedInstanceState: Bundle!)

This function is deprecated.

Unit

This function is deprecated.

Unit
onInflate(attrs: AttributeSet!, savedInstanceState: Bundle!)

This function is deprecated.

Unit

This function is deprecated.

Unit
onMultiWindowModeChanged(
    isInMultiWindowMode: Boolean,
    newConfig: Configuration!
)

This function is deprecated.

Boolean

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit
onPictureInPictureModeChanged(
    isInPictureInPictureMode: Boolean,
    newConfig: Configuration!
)

This function is deprecated.

Unit

This function is deprecated.

Unit
onRequestPermissionsResult(
    requestCode: Int,
    permissions: Array<String!>!,
    grantResults: IntArray!
)

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit
onTrimMemory(level: Int)

This function is deprecated.

Unit
onViewCreated(view: View!, savedInstanceState: Bundle!)

This function is deprecated.

Unit
onViewStateRestored(savedInstanceState: Bundle!)

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit
requestPermissions(permissions: Array<String!>!, requestCode: Int)

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit
setMenuVisibility(menuVisible: Boolean)

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit
setTargetFragment(fragment: Fragment!, requestCode: Int)

This function is deprecated.

Unit
setUserVisibleHint(isVisibleToUser: Boolean)

This function is deprecated.

Boolean

This function is deprecated.

Unit

This function is deprecated.

Unit
startActivityForResult(intent: Intent!, requestCode: Int)

This function is deprecated.

Unit
startIntentSenderForResult(
    intent: IntentSender!,
    requestCode: Int,
    fillInIntent: Intent!,
    flagsMask: Int,
    flagsValues: Int,
    extraFlags: Int,
    options: Bundle!
)

This function is deprecated.

Unit

This function is deprecated.

String!

This function is deprecated.

Unit

This function is deprecated.

From androidx.leanback.app.PlaybackFragment
Unit

This function is deprecated.

Call hideControlsOverlay

ObjectAdapter!
Int

Returns the background type.

ProgressBarManager!

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

Unit

Hide controls overlay.

Boolean

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

Boolean

Returns true if controls overlay is visible, false otherwise.

Boolean

This function is deprecated.

Uses isControlsOverlayAutoHideEnabled

Boolean

Returns true if showing and auto-hiding controls when user interacts; false otherwise.

Unit

Updates the ui when the row data changes.

Unit

Called when media has start or stop buffering.

Unit
onCreate(savedInstanceState: Bundle!)

This function is deprecated.

Unit

This function is deprecated.

Unit
onError(errorCode: Int, errorMessage: CharSequence!)

Called when media has error.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit
onViewCreated(view: View, savedInstanceState: Bundle?)

This function is deprecated.

Unit

Sets the list of rows for the fragment.

Unit

Sets the background type.

Unit

Enables or disables auto hiding controls overlay after a short delay fragment is resumed.

Unit

This function is deprecated.

Uses setControlsOverlayAutoHideEnabled

Unit

Sets the PlaybackGlueHost.HostCallback.

Unit

This listener is called every time there is a click in RowsFragment.

Unit

This listener is called every time there is a selection in RowsFragment.

Unit

Sets the input event handler.

Unit

Sets the BaseOnItemViewClickedListener that would be invoked for clicks only on androidx.leanback.widget.PlaybackRowPresenter.ViewHolder.

Unit

Sets the playback row for the playback controls.

Unit

Sets the presenter for rendering the playback row set by setPlaybackRow.

Unit

Interface to be implemented by UI widget to support PlaybackSeekUi.

Unit

Sets the selected row position with smooth animation.

Unit
setSelectedPosition(position: Int, smooth: Boolean)

Sets the selected row position.

Unit
setShowOrHideControlsOverlayOnUserInteraction(
    showOrHideControlsOverlayOnUserInteraction: Boolean
)

Enables or disables showing and auto-hiding controls when user interacts.

Unit

Show controls overlay.

Unit

Tickles the playback controls.

Public constructors

VideoFragment

Added in 1.1.0
Deprecated in 1.1.0
VideoFragment()

Public functions

getSurfaceView

Added in 1.1.0
Deprecated in 1.1.0
fun getSurfaceView(): SurfaceView!

Returns the surface view.

onCreateView

fun onCreateView(
    inflater: LayoutInflater!,
    container: ViewGroup?,
    savedInstanceState: Bundle!
): View?

onDestroyView

fun onDestroyView(): Unit

setSurfaceHolderCallback

Added in 1.1.0
Deprecated in 1.1.0
fun setSurfaceHolderCallback(callback: SurfaceHolder.Callback!): Unit

Adds SurfaceHolder.Callback to android.view.SurfaceView.

Protected functions

onVideoSizeChanged

protected fun onVideoSizeChanged(videoWidth: Int, videoHeight: Int): Unit

Called when size of the video changes. App may override.

Parameters
videoWidth: Int

Intrinsic width of video

videoHeight: Int

Intrinsic height of video