public static interface SubtitleTrack.RenderingWidget
Modifier and Type | Interface and Description |
---|---|
static interface |
SubtitleTrack.RenderingWidget.OnChangedListener
Callback used to send updates about changes to rendering data.
|
Modifier and Type | Method and Description |
---|---|
void |
draw(Canvas c)
Renders subtitles onto a
Canvas . |
void |
onAttachedToWindow()
Called when the widget is attached to a window.
|
void |
onDetachedFromWindow()
Called when the widget is detached from a window.
|
void |
setOnChangedListener(SubtitleTrack.RenderingWidget.OnChangedListener callback)
Sets the widget's callback, which is used to send updates when the
rendered data has changed.
|
void |
setSize(int width,
int height)
Sets the widget's size.
|
void |
setVisible(boolean visible)
Sets whether the widget should draw subtitles.
|
void setOnChangedListener(SubtitleTrack.RenderingWidget.OnChangedListener callback)
callback
- update callbackvoid setSize(int width, int height)
width
- width in pixelsheight
- height in pixelsvoid setVisible(boolean visible)
visible
- true if subtitles should be drawn, false otherwisevoid draw(Canvas c)
Canvas
.c
- canvas on which to render subtitlesvoid onAttachedToWindow()
void onDetachedFromWindow()