Save the date! Android Dev Summit is coming to Sunnyvale, CA on Oct 23-24, 2019.

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.

Summary

Inherited constants
Public constructors

use VideoSupportFragment

Public methods
open SurfaceView!

Returns the surface view.

open Unit

Adds SurfaceHolder.Callback to android.view.SurfaceView.

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

open Unit

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

Inherited functions

Public constructors

<init>

VideoFragment()

Deprecated: use VideoSupportFragment

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

Public methods

getSurfaceView

open fun getSurfaceView(): SurfaceView!

Returns the surface view.

setSurfaceHolderCallback

open fun setSurfaceHolderCallback(callback: Callback!): Unit

Adds SurfaceHolder.Callback to android.view.SurfaceView.

onCreateView

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

onDestroyView

open fun onDestroyView(): Unit

Protected methods

onVideoSizeChanged

protected open fun onVideoSizeChanged(width: Int, height: Int): Unit