# WatchFaceStyle

# WatchFaceStyle

```
@RestrictTo([Scope.LIBRARY_GROUP]) open class WatchFaceStyle : Parcelable
```

|---|--------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                         ||
| ↳ | [android.support.wearable.watchface.WatchFaceStyle](https://developer.android.com/reference/kotlin/android/support/wearable/watchface/WatchFaceStyle#) |

A style descriptor for watch faces.

## Summary

|                                                                                                                                                                                        Constants                                                                                                                                                                                         ||
|---------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| const[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [DEFAULT_ACCENT_COLOR](https://developer.android.com/reference/kotlin/android/support/wearable/watchface/WatchFaceStyle#Companion.DEFAULT_ACCENT_COLOR:kotlin.Int) <br />                                                                                                                               |
| const[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [PROTECT_HOTWORD_INDICATOR](https://developer.android.com/reference/kotlin/android/support/wearable/watchface/WatchFaceStyle#Companion.PROTECT_HOTWORD_INDICATOR:kotlin.Int) Whether to put a semi-transparent black background behind the "Ok Google" string to make it visible on a white background. |
| const[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [PROTECT_STATUS_BAR](https://developer.android.com/reference/kotlin/android/support/wearable/watchface/WatchFaceStyle#Companion.PROTECT_STATUS_BAR:kotlin.Int) Whether to put a semi-transparent black background behind the status bar to make it visible on white backgrounds.                        |
| const[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [PROTECT_WHOLE_SCREEN](https://developer.android.com/reference/kotlin/android/support/wearable/watchface/WatchFaceStyle#Companion.PROTECT_WHOLE_SCREEN:kotlin.Int) Whether to dim the entire watch face background slightly so the time and icons are always visible.                                   |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              Public constructors                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ||
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [WatchFaceStyle](https://developer.android.com/reference/kotlin/android/support/wearable/watchface/WatchFaceStyle#WatchFaceStyle(android.content.ComponentName,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Boolean,%20kotlin.Boolean,%20kotlin.Boolean,%20android.os.Bundle))`(`component:` `[ComponentName](https://developer.android.com/reference/android/content/ComponentName.html)`, `viewProtectionMode:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `statusBarGravity:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `@ColorInt` `accentColor:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `showUnreadCountIndicator:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`, `hideNotificationIndicator:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`, `acceptsTapEvents:` `[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`, `compatBundle:` `[Bundle](https://developer.android.com/reference/android/os/Bundle.html)?` `=` null)` A style descriptor for watch faces. |

|                                                                                                                                                                                                                Public methods                                                                                                                                                                                                                ||
|----------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| open[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)         | [describeContents](https://developer.android.com/reference/kotlin/android/support/wearable/watchface/WatchFaceStyle#describeContents())`()` <br />                                                                                                                                                                                                   |
| open[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [equals](https://developer.android.com/reference/kotlin/android/support/wearable/watchface/WatchFaceStyle#equals(kotlin.Any))`(`other:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)?`)` <br />                                                                                                                       |
| open[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)         | [hashCode](https://developer.android.com/reference/kotlin/android/support/wearable/watchface/WatchFaceStyle#hashCode())`()` <br />                                                                                                                                                                                                                   |
| open[Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)       | [writeToParcel](https://developer.android.com/reference/kotlin/android/support/wearable/watchface/WatchFaceStyle#writeToParcel(android.os.Parcel,%20kotlin.Int))`(`dest:` `[Parcel](https://developer.android.com/reference/android/os/Parcel.html)`, `flags:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` <br /> |

|                                                                                                                                                    Properties                                                                                                                                                    ||
|---------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                  | [accentColor](https://developer.android.com/reference/kotlin/android/support/wearable/watchface/WatchFaceStyle#accentColor:kotlin.Int) <br />                                                                       |
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)          | [acceptsTapEvents](https://developer.android.com/reference/kotlin/android/support/wearable/watchface/WatchFaceStyle#acceptsTapEvents:kotlin.Boolean) <br />                                                         |
| [Bundle](https://developer.android.com/reference/android/os/Bundle.html)?                   | [compatBundle](https://developer.android.com/reference/kotlin/android/support/wearable/watchface/WatchFaceStyle#compatBundle:android.os.Bundle) Escape hatch needed by WearOS to implement backwards compatibility. |
| [ComponentName](https://developer.android.com/reference/android/content/ComponentName.html) | [component](https://developer.android.com/reference/kotlin/android/support/wearable/watchface/WatchFaceStyle#component:android.content.ComponentName) <br />                                                        |
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)          | [hideNotificationIndicator](https://developer.android.com/reference/kotlin/android/support/wearable/watchface/WatchFaceStyle#hideNotificationIndicator:kotlin.Boolean) <br />                                       |
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)          | [showUnreadCountIndicator](https://developer.android.com/reference/kotlin/android/support/wearable/watchface/WatchFaceStyle#showUnreadCountIndicator:kotlin.Boolean) <br />                                         |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                  | [statusBarGravity](https://developer.android.com/reference/kotlin/android/support/wearable/watchface/WatchFaceStyle#statusBarGravity:kotlin.Int) <br />                                                             |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                  | [viewProtectionMode](https://developer.android.com/reference/kotlin/android/support/wearable/watchface/WatchFaceStyle#viewProtectionMode:kotlin.Int) <br />                                                         |

|                                                                                                                                                                                     Companion properties                                                                                                                                                                                     ||
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Creator](https://developer.android.com/reference/android/os/Parcelable/Creator.html)\<[WatchFaceStyle](https://developer.android.com/reference/kotlin/android/support/wearable/watchface/WatchFaceStyle#)\> | [CREATOR](https://developer.android.com/reference/kotlin/android/support/wearable/watchface/WatchFaceStyle#Companion.CREATOR:android.os.Parcelable.Creator) Parcelable Creator |

## Constants

### DEFAULT_ACCENT_COLOR

```
const val DEFAULT_ACCENT_COLOR: Int
```  

    Value: Color.WHITE

### PROTECT_HOTWORD_INDICATOR

```
const val PROTECT_HOTWORD_INDICATOR: Int
```

Whether to put a semi-transparent black background behind the "Ok Google" string to make it visible on a white background.  

    Value: 0x2

### PROTECT_STATUS_BAR

```
const val PROTECT_STATUS_BAR: Int
```

Whether to put a semi-transparent black background behind the status bar to make it visible on white backgrounds.  

    Value: 0x1

### PROTECT_WHOLE_SCREEN

```
const val PROTECT_WHOLE_SCREEN: Int
```

Whether to dim the entire watch face background slightly so the time and icons are always visible.  

    Value: 0x4

## Public constructors

### WatchFaceStyle

```
WatchFaceStyle(
    component: ComponentName, 
    viewProtectionMode: Int, 
    statusBarGravity: Int, 
    @ColorInt accentColor: Int, 
    showUnreadCountIndicator: Boolean, 
    hideNotificationIndicator: Boolean, 
    acceptsTapEvents: Boolean, 
    compatBundle: Bundle? = null)
```

A style descriptor for watch faces.

## Public methods

### describeContents

```
open fun describeContents(): Int
```  

### equals

```
open fun equals(other: Any?): Boolean
```  

### hashCode

```
open fun hashCode(): Int
```  

### writeToParcel

```
open fun writeToParcel(
    dest: Parcel, 
    flags: Int
): Unit
```

## Properties

### accentColor

```
val accentColor: Int
```  

### acceptsTapEvents

```
val acceptsTapEvents: Boolean
```  

### compatBundle

```
val compatBundle: Bundle?
```

Escape hatch needed by WearOS to implement backwards compatibility. Note WearOS support for obsolete WatchFaceStyle properties may be removed without notice.  

### component

```
val component: ComponentName
```  

### hideNotificationIndicator

```
val hideNotificationIndicator: Boolean
```  

### showUnreadCountIndicator

```
val showUnreadCountIndicator: Boolean
```  

### statusBarGravity

```
val statusBarGravity: Int
```  

### viewProtectionMode

```
val viewProtectionMode: Int
```

## Companion properties

### CREATOR

```
val CREATOR: Creator<WatchFaceStyle>
```

Parcelable Creator