public class SubtitleLayer extends java.lang.Object implements Layer, ExoplayerWrapper.TextListener
| Constructor and Description |
|---|
SubtitleLayer() |
| Modifier and Type | Method and Description |
|---|---|
android.widget.FrameLayout |
createView(LayerManager layerManager)
Builds and sets up the view that will be layered onto the video player.
|
void |
onLayerDisplayed(LayerManager layerManager)
Called when a Layer's view has been displayed on the screen.
|
void |
onText(java.lang.String text)
When subtitles arrive, display them in the text view.
|
void |
setVisibility(int visibility)
Show or hide the subtitles.
|
public android.widget.FrameLayout createView(LayerManager layerManager)
LayerFrameLayout to ensure that the LayerManager can overlay it on top
of the other layers.createView in interface LayerlayerManager - The LayerManager which will contain this layer.LayerManagerpublic void onLayerDisplayed(LayerManager layerManager)
LayeronLayerDisplayed in interface LayerlayerManager - The LayerManager which will contain this layer.public void onText(java.lang.String text)
onText in interface ExoplayerWrapper.TextListenertext - The subtitles that must be displayed.public void setVisibility(int visibility)
visibility - One of View.INVISIBLE,
View.VISIBLE, View.GONE.