added in version 25.4.0
belongs to Maven artifact
Deprecated since version 27.1.0


public class VideoFragment
extends PlaybackFragment


This class was deprecated in API level 27.1.0.
use VideoSupportFragment

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


Inherited constants

From class
From interface android.content.ComponentCallbacks2

Public constructors


Public methods

SurfaceView getSurfaceView()

Returns the surface view.

View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
void onDestroyView()
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

From class