VideoSupportFragment

public class VideoSupportFragment
extends PlaybackSupportFragment

java.lang.Object
   ↳ androidx.fragment.app.Fragment
     ↳ androidx.leanback.app.PlaybackSupportFragment
       ↳ androidx.leanback.app.VideoSupportFragment


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

Summary

Inherited constants

Public constructors

VideoSupportFragment()

Public methods

SurfaceView getSurfaceView()

Returns the surface view.

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

Called to have the fragment instantiate its user interface view.

void onDestroyView()

Called when the view previously created by onCreateView(LayoutInflater, ViewGroup, Bundle) has been detached from the fragment.

void setSurfaceHolderCallback(SurfaceHolder.Callback callback)

Adds SurfaceHolder.Callback to SurfaceView.

Protected methods

void onVideoSizeChanged(int width, int height)

Called when size of the video changes.

Inherited methods