# CaptioningManager.CaptionStyle

Added in[API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Constants](https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle#constants)\|[Fields](https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle#lfields)\|[Methods](https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle#inhmethods)  

# CaptioningManager.CaptionStyle

*** ** * ** ***

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

`
public
static
final

class
CaptioningManager.CaptionStyle
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


`

|---|-----------------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.view.accessibility.CaptioningManager.CaptionStyle |

<br />

*** ** * ** ***

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

## Summary

|                                                                                                   ### Constants                                                                                                   ||
|-------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | [EDGE_TYPE_DEPRESSED](https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle#EDGE_TYPE_DEPRESSED) Edge type value specifying depressed bevel character edges.   |
| `int` | [EDGE_TYPE_DROP_SHADOW](https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle#EDGE_TYPE_DROP_SHADOW) Edge type value specifying drop-shadowed character edges. |
| `int` | [EDGE_TYPE_NONE](https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle#EDGE_TYPE_NONE) Edge type value specifying no character edges.                          |
| `int` | [EDGE_TYPE_OUTLINE](https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle#EDGE_TYPE_OUTLINE) Edge type value specifying uniformly outlined character edges.    |
| `int` | [EDGE_TYPE_RAISED](https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle#EDGE_TYPE_RAISED) Edge type value specifying raised bevel character edges.            |
| `int` | [EDGE_TYPE_UNSPECIFIED](https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle#EDGE_TYPE_UNSPECIFIED) Unspecified edge type value.                              |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ### Fields                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      ||
|---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` public final int` | [backgroundColor](https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle#backgroundColor) The preferred background color for video captions.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ` public final int` | [edgeColor](https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle#edgeColor) The preferred edge color for video captions, if using an edge type other than[EDGE_TYPE_NONE](https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle#EDGE_TYPE_NONE).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ` public final int` | [edgeType](https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle#edgeType) The preferred edge type for video captions, one of: - [EDGE_TYPE_UNSPECIFIED](https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle#EDGE_TYPE_UNSPECIFIED) - [EDGE_TYPE_NONE](https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle#EDGE_TYPE_NONE) - [EDGE_TYPE_OUTLINE](https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle#EDGE_TYPE_OUTLINE) - [EDGE_TYPE_DROP_SHADOW](https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle#EDGE_TYPE_DROP_SHADOW) - [EDGE_TYPE_RAISED](https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle#EDGE_TYPE_RAISED) - [EDGE_TYPE_DEPRESSED](https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle#EDGE_TYPE_DEPRESSED) <br /> |
| ` public final int` | [foregroundColor](https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle#foregroundColor) The preferred foreground color for video captions.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| ` public final int` | [windowColor](https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle#windowColor) The preferred window color for video captions.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |

|                                                                                                           ### Public methods                                                                                                           ||
|----------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` `[Typeface](https://developer.android.com/reference/android/graphics/Typeface) | ` `[getTypeface](https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle#getTypeface())`() `               |
| ` boolean`                                                                       | ` `[hasBackgroundColor](https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle#hasBackgroundColor())`() ` |
| ` boolean`                                                                       | ` `[hasEdgeColor](https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle#hasEdgeColor())`() `             |
| ` boolean`                                                                       | ` `[hasEdgeType](https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle#hasEdgeType())`() `               |
| ` boolean`                                                                       | ` `[hasForegroundColor](https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle#hasForegroundColor())`() ` |
| ` boolean`                                                                       | ` `[hasWindowColor](https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle#hasWindowColor())`() `         |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                          | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||

## Constants

### EDGE_TYPE_DEPRESSED

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

```
public static final int EDGE_TYPE_DEPRESSED
```

Edge type value specifying depressed bevel character edges.

<br />

Constant Value: 4 (0x00000004)  

### EDGE_TYPE_DROP_SHADOW

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

```
public static final int EDGE_TYPE_DROP_SHADOW
```

Edge type value specifying drop-shadowed character edges.

<br />

Constant Value: 2 (0x00000002)  

### EDGE_TYPE_NONE

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

```
public static final int EDGE_TYPE_NONE
```

Edge type value specifying no character edges.

<br />

Constant Value: 0 (0x00000000)  

### EDGE_TYPE_OUTLINE

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

```
public static final int EDGE_TYPE_OUTLINE
```

Edge type value specifying uniformly outlined character edges.

<br />

Constant Value: 1 (0x00000001)  

### EDGE_TYPE_RAISED

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

```
public static final int EDGE_TYPE_RAISED
```

Edge type value specifying raised bevel character edges.

<br />

Constant Value: 3 (0x00000003)  

### EDGE_TYPE_UNSPECIFIED

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

```
public static final int EDGE_TYPE_UNSPECIFIED
```

Unspecified edge type value.

<br />

Constant Value: -1 (0xffffffff)

## Fields

### backgroundColor

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

```
public final int backgroundColor
```

The preferred background color for video captions.

<br />

### edgeColor

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

```
public final int edgeColor
```

The preferred edge color for video captions, if using an edge type other than[EDGE_TYPE_NONE](https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle#EDGE_TYPE_NONE).

<br />

### edgeType

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

```
public final int edgeType
```

The preferred edge type for video captions, one of:

- [EDGE_TYPE_UNSPECIFIED](https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle#EDGE_TYPE_UNSPECIFIED)
- [EDGE_TYPE_NONE](https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle#EDGE_TYPE_NONE)
- [EDGE_TYPE_OUTLINE](https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle#EDGE_TYPE_OUTLINE)
- [EDGE_TYPE_DROP_SHADOW](https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle#EDGE_TYPE_DROP_SHADOW)
- [EDGE_TYPE_RAISED](https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle#EDGE_TYPE_RAISED)
- [EDGE_TYPE_DEPRESSED](https://developer.android.com/reference/android/view/accessibility/CaptioningManager.CaptionStyle#EDGE_TYPE_DEPRESSED)

<br />

<br />

### foregroundColor

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

```
public final int foregroundColor
```

The preferred foreground color for video captions.

<br />

### windowColor

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

```
public final int windowColor
```

The preferred window color for video captions.

<br />

## Public methods

### getTypeface

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

```
public Typeface getTypeface ()
```

<br />

<br />

|                                                                                                           Returns                                                                                                            ||
|-------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|
| [Typeface](https://developer.android.com/reference/android/graphics/Typeface) | the preferred[Typeface](https://developer.android.com/reference/android/graphics/Typeface)for video captions, or null if not specified <br /> |

### hasBackgroundColor

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

```
public boolean hasBackgroundColor ()
```

<br />

<br />

|                                                              Returns                                                               ||
|-----------|-------------------------------------------------------------------------------------------------------------------------|
| `boolean` | `true`if the user has specified a background color that should override the application default,`false`otherwise <br /> |

### hasEdgeColor

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

```
public boolean hasEdgeColor ()
```

<br />

<br />

|                                                            Returns                                                            ||
|-----------|--------------------------------------------------------------------------------------------------------------------|
| `boolean` | `true`if the user has specified an edge color that should override the application default,`false`otherwise <br /> |

### hasEdgeType

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

```
public boolean hasEdgeType ()
```

<br />

<br />

|                                                           Returns                                                            ||
|-----------|-------------------------------------------------------------------------------------------------------------------|
| `boolean` | `true`if the user has specified an edge type that should override the application default,`false`otherwise <br /> |

### hasForegroundColor

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

```
public boolean hasForegroundColor ()
```

<br />

<br />

|                                                              Returns                                                               ||
|-----------|-------------------------------------------------------------------------------------------------------------------------|
| `boolean` | `true`if the user has specified a foreground color that should override the application default,`false`otherwise <br /> |

### hasWindowColor

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

```
public boolean hasWindowColor ()
```

<br />

<br />

|                                                            Returns                                                             ||
|-----------|---------------------------------------------------------------------------------------------------------------------|
| `boolean` | `true`if the user has specified a window color that should override the application default,`false`otherwise <br /> |