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)
Layer
FrameLayout
to ensure that the LayerManager
can overlay it on top
of the other layers.createView
in interface Layer
layerManager
- The LayerManager
which will contain this layer.LayerManager
public void onLayerDisplayed(LayerManager layerManager)
Layer
onLayerDisplayed
in interface Layer
layerManager
- The LayerManager
which will contain this layer.public void onText(java.lang.String text)
onText
in interface ExoplayerWrapper.TextListener
text
- The subtitles that must be displayed.public void setVisibility(int visibility)
visibility
- One of View.INVISIBLE
,
View.VISIBLE
, View.GONE
.