# CaptioningManager.CaptioningChangeListener

Added in[API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# CaptioningChangeListener

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptioningChangeListener "View this page in Java")  

```
abstract class CaptioningChangeListener
```

|---|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                                                                 ||
| ↳ | [android.view.accessibility.CaptioningManager.CaptioningChangeListener](https://developer.android.com/reference/kotlin/android/view/accessibility/CaptioningManager.CaptioningChangeListener#) |

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

## Summary

|                                                                                    Public constructors                                                                                    ||
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [CaptioningChangeListener](https://developer.android.com/reference/kotlin/android/view/accessibility/CaptioningManager.CaptioningChangeListener#CaptioningChangeListener())`()` <br /> |

|                                                                                                                                                                                                                                                     Public methods                                                                                                                                                                                                                                                     ||
|----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onEnabledChanged](https://developer.android.com/reference/kotlin/android/view/accessibility/CaptioningManager.CaptioningChangeListener#onEnabledChanged(kotlin.Boolean))`(`enabled:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` Called when the captioning enabled state changes.                                                                                                       |
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onFontScaleChanged](https://developer.android.com/reference/kotlin/android/view/accessibility/CaptioningManager.CaptioningChangeListener#onFontScaleChanged(kotlin.Float))`(`fontScale:` `[Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html)`)` Called when the captioning font scaling factor changes.                                                                                                 |
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onLocaleChanged](https://developer.android.com/reference/kotlin/android/view/accessibility/CaptioningManager.CaptioningChangeListener#onLocaleChanged(java.util.Locale))`(`locale:` `[Locale](https://developer.android.com/reference/kotlin/java/util/Locale.html#)?`)` Called when the captioning locale changes.                                                                                                                 |
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onSystemAudioCaptioningChanged](https://developer.android.com/reference/kotlin/android/view/accessibility/CaptioningManager.CaptioningChangeListener#onSystemAudioCaptioningChanged(kotlin.Boolean))`(`enabled:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` Called when the system audio caption enabled state changes.                                                                 |
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onSystemAudioCaptioningUiChanged](https://developer.android.com/reference/kotlin/android/view/accessibility/CaptioningManager.CaptioningChangeListener#onSystemAudioCaptioningUiChanged(kotlin.Boolean))`(`enabled:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`)` Called when the system audio caption UI enabled state changes.                                                          |
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onUserStyleChanged](https://developer.android.com/reference/kotlin/android/view/accessibility/CaptioningManager.CaptioningChangeListener#onUserStyleChanged(android.view.accessibility.CaptioningManager.CaptionStyle))`(`userStyle:` `[CaptioningManager.CaptionStyle](https://developer.android.com/reference/kotlin/android/view/accessibility/CaptioningManager.CaptionStyle)`)` Called when the captioning user style changes. |

## Public constructors

### CaptioningChangeListener

```
CaptioningChangeListener()
```

## Public methods

### onEnabledChanged

Added in[API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun onEnabledChanged(enabled: Boolean): Unit
```

Called when the captioning enabled state changes.

|                                                                   Parameters                                                                    ||
|-----------|--------------------------------------------------------------------------------------------------------------------------------------|
| `enabled` | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html):the user's new preferred captioning enabled state |

### onFontScaleChanged

Added in[API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun onFontScaleChanged(fontScale: Float): Unit
```

Called when the captioning font scaling factor changes.

|                                                          Parameters                                                           ||
|-------------|------------------------------------------------------------------------------------------------------------------|
| `fontScale` | [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html):the preferred font scaling factor |

**See Also**

- [android.view.accessibility.CaptioningManager#getFontScale()](https://developer.android.com/reference/kotlin/android/view/accessibility/CaptioningManager#getFontScale())  

### onLocaleChanged

Added in[API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun onLocaleChanged(locale: Locale?): Unit
```

Called when the captioning locale changes.

|                                                                      Parameters                                                                      ||
|----------|--------------------------------------------------------------------------------------------------------------------------------------------|
| `locale` | [Locale](https://developer.android.com/reference/kotlin/java/util/Locale.html#)?:the preferred captioning locale, or`null`if not specified |

**See Also**

- [android.view.accessibility.CaptioningManager#getLocale()](https://developer.android.com/reference/kotlin/android/view/accessibility/CaptioningManager#getLocale())  

### onSystemAudioCaptioningChanged

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun onSystemAudioCaptioningChanged(enabled: Boolean): Unit
```

Called when the system audio caption enabled state changes.

|                                                              Parameters                                                              ||
|-----------|---------------------------------------------------------------------------------------------------------------------------|
| `enabled` | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html):the system audio caption enabled state |

### onSystemAudioCaptioningUiChanged

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun onSystemAudioCaptioningUiChanged(enabled: Boolean): Unit
```

Called when the system audio caption UI enabled state changes.

|                                                               Parameters                                                                ||
|-----------|------------------------------------------------------------------------------------------------------------------------------|
| `enabled` | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html):the system audio caption UI enabled state |

### onUserStyleChanged

Added in[API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun onUserStyleChanged(userStyle: CaptioningManager.CaptionStyle): Unit
```

Called when the captioning user style changes.

|                                                                                                     Parameters                                                                                                     ||
|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `userStyle` | [CaptioningManager.CaptionStyle](https://developer.android.com/reference/kotlin/android/view/accessibility/CaptioningManager.CaptionStyle):the user's new preferred style This value cannot be`null`. |

**See Also**

- [android.view.accessibility.CaptioningManager#getUserStyle()](https://developer.android.com/reference/kotlin/android/view/accessibility/CaptioningManager#getUserStyle())