VideoView

Displays a video file. The VideoView class
can load images from various sources (such as resources or content
providers), takes care of computing its measurement from the video so that
it can be used in any layout manager, and provides various display options
such as scaling and tinting.

Defines the next view to give focus to when the next focus is
FOCUS_DOWN
If the reference refers to a view that does not exist or is part
of a hierarchy that is invisible, a RuntimeException
will result when the reference is accessed.

Defines the next view to give focus to when the next focus is
FOCUS_FORWARD
If the reference refers to a view that does not exist or is part
of a hierarchy that is invisible, a RuntimeException
will result when the reference is accessed.

Defines the next view to give focus to when the next focus is
FOCUS_RIGHT
If the reference refers to a view that does not exist or is part
of a hierarchy that is invisible, a RuntimeException
will result when the reference is accessed.

Defines the next view to give focus to when the next focus is
FOCUS_UP
If the reference refers to a view that does not exist or is part
of a hierarchy that is invisible, a RuntimeException
will result when the reference is accessed.

Autofill type for a field that contains a date, which is represented by a long representing
the number of milliseconds since the standard base time known as "the epoch", namely
January 1, 1970, 00:00:00 GMT (see getTime().

Flag for setSystemUiVisibility(int): View has requested to go
into the normal fullscreen mode so that its content can take over the screen
while still allowing the user to interact with the application.

Convenience method for sending a TYPE_ANNOUNCEMENTAccessibilityEvent to make an announcement which is related to some
sort of a context change for which none of the events representing UI transitions
is a good fit.

Indicates whether the view is currently tracking transient state that the
app should not need to concern itself with saving and restoring, but that
the framework should take special note to preserve when possible.

Sets whether or not this view should account for system screen decorations
such as the status bar and inset its content; that is, controlling whether
the default implementation of fitSystemWindows(Rect) will be
executed.

Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.

Public methods

addSubtitleSource

Adds an external subtitle source file (from the provided input stream.)
Note that a single external subtitle source may contain multiple or no
supported tracks in it. If the source contained at least one track in
it, one will receive an MEDIA_INFO_METADATA_UPDATE
info message. Otherwise, if reading the source takes excessive time,
one will receive a MEDIA_INFO_SUBTITLE_TIMED_OUT
message. If the source contained no supported track (including an empty
source file or null input stream), one will receive a MEDIA_INFO_UNSUPPORTED_SUBTITLE message. One can find the
total number of available tracks using getTrackInfo()
to see what additional tracks become available after this method call.

Parameters

is

InputStream: input stream containing the subtitle data. It will be
closed by the media framework.

format

MediaFormat: the format of the subtitle track(s). Must contain at least
the mime type (KEY_MIME) and the
language (KEY_LANGUAGE) of the file.
If the file itself contains the language information,
specify "und" for the language.

canSeekBackward

canSeekForward

draw

Manually render this view (and all of its children) to the given Canvas.
The view must have already done a full layout before this function is
called. When implementing a view, implement
onDraw(android.graphics.Canvas) instead of overriding this method.
If you do need to override this method, call the superclass version.

Parameters

canvas

Canvas: The Canvas to which the View is rendered.

getAccessibilityClassName

Return the class name of this object to be used for accessibility purposes.
Subclasses should only override this if they are implementing something that
should be seen as a completely new class of view when used by accessibility,
unrelated to the class it is deriving from. This is used to fill in
AccessibilityNodeInfo.setClassName.

onTrackballEvent

Implement this method to handle trackball motion events. The
relative movement of the trackball since the last event
can be retrieve with MotionEvent.getX() and
MotionEvent.getY(). These are normalized so
that a movement of 1 corresponds to the user pressing one DPAD key (so
they will often be fractional values, representing the more fine-grained
movement information available from a trackball).

setVideoURI

Map: the headers for the URI request.
Note that the cross domain redirection is allowed by default, but that can be
changed with key/value pairs through the headers parameter with
"android-allow-cross-domain-redirect" as the key and "0" or "1" as the value
to disallow or allow cross domain redirection.

stopPlayback

suspend

Protected methods

onAttachedToWindow

This is called when the view is attached to a window. At this point it
has a Surface and will start drawing. Note that this function is
guaranteed to be called before onDraw(android.graphics.Canvas),
however it may be called any time before the first onDraw -- including
before or after onMeasure(int, int).

onMeasure

Measure the view and its content to determine the measured width and the
measured height. This method is invoked by measure(int, int) and
should be overridden by subclasses to provide accurate and efficient
measurement of their contents.

The base class implementation of measure defaults to the background size,
unless a larger size is allowed by the MeasureSpec. Subclasses should
override onMeasure(int, int) to provide better measurements of
their content.