public class CaptioningManager extends Object
To obtain a handle to the captioning manager, do the following:
CaptioningManager captioningManager =
(CaptioningManager) context.getSystemService(Context.CAPTIONING_SERVICE);
Modifier and Type | Class and Description |
---|---|
static class |
CaptioningManager.CaptioningChangeListener
Listener for changes in captioning properties, including enabled state
and user style preferences.
|
static class |
CaptioningManager.CaptionStyle
Specifies visual properties for video captions, including foreground and
background colors, edge properties, and typeface.
|
Constructor and Description |
---|
CaptioningManager(Context context)
Creates a new captioning manager for the specified context.
|
Modifier and Type | Method and Description |
---|---|
void |
addCaptioningChangeListener(CaptioningManager.CaptioningChangeListener listener)
Adds a listener for changes in the user's preferred captioning enabled
state and visual properties.
|
float |
getFontScale() |
Locale |
getLocale() |
String |
getRawLocale() |
int |
getRawUserStyle() |
CaptioningManager.CaptionStyle |
getUserStyle() |
boolean |
isEnabled() |
void |
removeCaptioningChangeListener(CaptioningManager.CaptioningChangeListener listener)
Removes a listener previously added using
addCaptioningChangeListener(android.view.accessibility.CaptioningManager.CaptioningChangeListener) . |
public CaptioningManager(Context context)
public final boolean isEnabled()
public final String getRawLocale()
public final Locale getLocale()
public final float getFontScale()
public int getRawUserStyle()
public CaptioningManager.CaptionStyle getUserStyle()
CaptioningManager.CaptionStyle
, or the default style if not specifiedpublic void addCaptioningChangeListener(CaptioningManager.CaptioningChangeListener listener)
listener
- the listener to addpublic void removeCaptioningChangeListener(CaptioningManager.CaptioningChangeListener listener)
addCaptioningChangeListener(android.view.accessibility.CaptioningManager.CaptioningChangeListener)
.listener
- the listener to remove