Added in API level 19

CaptioningChangeListener

abstract class CaptioningChangeListener
kotlin.Any
   ↳ android.view.accessibility.CaptioningManager.CaptioningChangeListener

Listener for changes in captioning properties, including enabled state and user style preferences.

Summary

Public constructors

Public methods
open Unit

Called when the captioning enabled state changes.

open Unit

Called when the captioning font scaling factor changes.

open Unit

Called when the captioning locale changes.

open Unit

Called when the system audio caption enabled state changes.

open Unit

Called when the system audio caption UI enabled state changes.

open Unit

Called when the captioning user style changes.

Public constructors

CaptioningChangeListener

CaptioningChangeListener()

Public methods

onEnabledChanged

Added in API level 19
open fun onEnabledChanged(enabled: Boolean): Unit

Called when the captioning enabled state changes.

Parameters
enabled Boolean: the user's new preferred captioning enabled state

onFontScaleChanged

Added in API level 19
open fun onFontScaleChanged(fontScale: Float): Unit

Called when the captioning font scaling factor changes.

Parameters
fontScale Float: the preferred font scaling factor

onLocaleChanged

Added in API level 19
open fun onLocaleChanged(locale: Locale?): Unit

Called when the captioning locale changes.

Parameters
locale Locale?: the preferred captioning locale, or null if not specified

onSystemAudioCaptioningChanged

Added in API level 33
open fun onSystemAudioCaptioningChanged(enabled: Boolean): Unit

Called when the system audio caption enabled state changes.

Parameters
enabled Boolean: the system audio caption enabled state

onSystemAudioCaptioningUiChanged

Added in API level 33
open fun onSystemAudioCaptioningUiChanged(enabled: Boolean): Unit

Called when the system audio caption UI enabled state changes.

Parameters
enabled Boolean: the system audio caption UI enabled state

onUserStyleChanged

Added in API level 19
open fun onUserStyleChanged(userStyle: CaptioningManager.CaptionStyle): Unit

Called when the captioning user style changes.

Parameters
userStyle CaptioningManager.CaptionStyle: the user's new preferred style This value cannot be null.