CaptioningManager
open class CaptioningManager
kotlin.Any | |
↳ | android.view.accessibility.CaptioningManager |
Contains methods for accessing and monitoring preferred video captioning state and visual properties.
Summary
Nested classes | |
---|---|
Specifies visual properties for video captions, including foreground and background colors, edge properties, and typeface. |
|
abstract |
Listener for changes in captioning properties, including enabled state and user style preferences. |
Public methods | |
---|---|
open Unit |
Adds a listener for changes in the user's preferred captioning enabled state and visual properties. |
Float | |
Locale? | |
open CaptioningManager.CaptionStyle | |
open Boolean |
Returns true if system wide call captioning is enabled for this device. |
Boolean | |
Boolean | |
Boolean | |
open Unit |
Removes a listener previously added using |
Public methods
addCaptioningChangeListener
open fun addCaptioningChangeListener(listener: CaptioningManager.CaptioningChangeListener): Unit
Adds a listener for changes in the user's preferred captioning enabled state and visual properties.
Parameters | |
---|---|
listener |
CaptioningManager.CaptioningChangeListener: the listener to add This value cannot be null . |
getFontScale
fun getFontScale(): Float
Return | |
---|---|
Float |
the user's preferred font scaling factor for video captions, or 1 if not specified |
getLocale
fun getLocale(): Locale?
Return | |
---|---|
Locale? |
the locale for the user's preferred captioning language, or null if not specified |
getUserStyle
open fun getUserStyle(): CaptioningManager.CaptionStyle
Return | |
---|---|
CaptioningManager.CaptionStyle |
the user's preferred visual properties for captions as a CaptionStyle , or the default style if not specified This value cannot be null . |
isCallCaptioningEnabled
open fun isCallCaptioningEnabled(): Boolean
Returns true if system wide call captioning is enabled for this device.
isEnabled
fun isEnabled(): Boolean
Return | |
---|---|
Boolean |
the user's preferred captioning enabled state |
isSystemAudioCaptioningEnabled
fun isSystemAudioCaptioningEnabled(): Boolean
Return | |
---|---|
Boolean |
the system audio caption enabled state. |
isSystemAudioCaptioningUiEnabled
fun isSystemAudioCaptioningUiEnabled(): Boolean
Return | |
---|---|
Boolean |
the system audio caption UI enabled state. |
removeCaptioningChangeListener
open fun removeCaptioningChangeListener(listener: CaptioningManager.CaptioningChangeListener): Unit
Removes a listener previously added using addCaptioningChangeListener
.
Parameters | |
---|---|
listener |
CaptioningManager.CaptioningChangeListener: the listener to remove This value cannot be null . |