Added in API level 19

CaptionStyle

class CaptionStyle
kotlin.Any
   ↳ android.view.accessibility.CaptioningManager.CaptionStyle

Specifies visual properties for video captions, including foreground and background colors, edge properties, and typeface.

Summary

Constants
static Int

Edge type value specifying depressed bevel character edges.

static Int

Edge type value specifying drop-shadowed character edges.

static Int

Edge type value specifying no character edges.

static Int

Edge type value specifying uniformly outlined character edges.

static Int

Edge type value specifying raised bevel character edges.

static Int

Unspecified edge type value.

Public methods
Typeface?

Boolean

Boolean

Boolean

Boolean

Boolean

Properties
Int

The preferred background color for video captions.

Int

The preferred edge color for video captions, if using an edge type other than EDGE_TYPE_NONE.

Int

The preferred edge type for video captions, one of:

Int

The preferred foreground color for video captions.

Int

The preferred window color for video captions.

Constants

EDGE_TYPE_DEPRESSED

Added in API level 21
static val EDGE_TYPE_DEPRESSED: Int

Edge type value specifying depressed bevel character edges.

Value: 4

EDGE_TYPE_DROP_SHADOW

Added in API level 19
static val EDGE_TYPE_DROP_SHADOW: Int

Edge type value specifying drop-shadowed character edges.

Value: 2

EDGE_TYPE_NONE

Added in API level 19
static val EDGE_TYPE_NONE: Int

Edge type value specifying no character edges.

Value: 0

EDGE_TYPE_OUTLINE

Added in API level 19
static val EDGE_TYPE_OUTLINE: Int

Edge type value specifying uniformly outlined character edges.

Value: 1

EDGE_TYPE_RAISED

Added in API level 21
static val EDGE_TYPE_RAISED: Int

Edge type value specifying raised bevel character edges.

Value: 3

EDGE_TYPE_UNSPECIFIED

Added in API level 21
static val EDGE_TYPE_UNSPECIFIED: Int

Unspecified edge type value.

Value: -1

Public methods

getTypeface

Added in API level 19
fun getTypeface(): Typeface?
Return
Typeface? the preferred Typeface for video captions, or null if not specified

hasBackgroundColor

Added in API level 21
fun hasBackgroundColor(): Boolean
Return
Boolean true if the user has specified a background color that should override the application default, false otherwise

hasEdgeColor

Added in API level 21
fun hasEdgeColor(): Boolean
Return
Boolean true if the user has specified an edge color that should override the application default, false otherwise

hasEdgeType

Added in API level 21
fun hasEdgeType(): Boolean
Return
Boolean true if the user has specified an edge type that should override the application default, false otherwise

hasForegroundColor

Added in API level 21
fun hasForegroundColor(): Boolean
Return
Boolean true if the user has specified a foreground color that should override the application default, false otherwise

hasWindowColor

Added in API level 21
fun hasWindowColor(): Boolean
Return
Boolean true if the user has specified a window color that should override the application default, false otherwise

Properties

backgroundColor

Added in API level 19
val backgroundColor: Int

The preferred background color for video captions.

edgeColor

Added in API level 19
val edgeColor: Int

The preferred edge color for video captions, if using an edge type other than EDGE_TYPE_NONE.

edgeType

Added in API level 19
val edgeType: Int

The preferred edge type for video captions, one of:

foregroundColor

Added in API level 19
val foregroundColor: Int

The preferred foreground color for video captions.

windowColor

Added in API level 21
val windowColor: Int

The preferred window color for video captions.