Android 12 Developer Preview is here! Try it out, and give us your feedback!

VideoFragment

open class VideoFragment : PlaybackFragment
kotlin.Any
   ↳ android.app.Fragment
   ↳ androidx.leanback.app.PlaybackFragment
   ↳ androidx.leanback.app.VideoFragment

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

Inherited constants
Public constructors

Subclass of PlaybackFragment that is responsible for providing a SurfaceView and rendering video.

Public methods
open SurfaceView!

Returns the surface view.

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

open Unit

open Unit

Adds SurfaceHolder.Callback to android.view.SurfaceView.

Protected methods
open Unit
onVideoSizeChanged(width: Int, height: Int)

Inherited functions