# WatchFace.OverlayStyle

Artifact: [androidx.wear.watchface:watchface](https://developer.android.com/jetpack/androidx/releases/wear-watchface) [View Source](https://cs.android.com/search?q=file:androidx/wear/watchface/WatchFace.kt+class:androidx.wear.watchface.WatchFace.OverlayStyle) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.1.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.2.0)

*** ** * ** ***


```
public final class WatchFace.OverlayStyle
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
> OverlayStyle will be removed in a future release.

This class allows the watch face to configure the status overlay which is rendered by the system on top of the watch face.

Note: This is not a supported API and will be removed.

## Summary

| ### Public constructors |
|---|
| `[OverlayStyle](https://developer.android.com/reference/androidx/wear/watchface/WatchFace.OverlayStyle#OverlayStyle())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `[OverlayStyle](https://developer.android.com/reference/androidx/wear/watchface/WatchFace.OverlayStyle#OverlayStyle(android.graphics.Color,android.graphics.Color))(https://developer.android.com/reference/android/graphics/Color.html backgroundColor, https://developer.android.com/reference/android/graphics/Color.html foregroundColor)` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

| ### Public methods |
|---|---|
| `boolean` | `[equals](https://developer.android.com/reference/androidx/wear/watchface/WatchFace.OverlayStyle#equals(kotlin.Any))(https://developer.android.com/reference/java/lang/Object.html other)` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final https://developer.android.com/reference/android/graphics/Color.html` | `[getBackgroundColor](https://developer.android.com/reference/androidx/wear/watchface/WatchFace.OverlayStyle#getBackgroundColor())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `final https://developer.android.com/reference/android/graphics/Color.html` | `[getForegroundColor](https://developer.android.com/reference/androidx/wear/watchface/WatchFace.OverlayStyle#getForegroundColor())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `int` | `[hashCode](https://developer.android.com/reference/androidx/wear/watchface/WatchFace.OverlayStyle#hashCode())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `[toString](https://developer.android.com/reference/androidx/wear/watchface/WatchFace.OverlayStyle#toString())()` **This method is deprecated.** AndroidX watchface libraries are deprecated, use Watch Face Format instead. |

## Public constructors

### OverlayStyle

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.1.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.2.0)

```
public [OverlayStyle](https://developer.android.com/reference/androidx/wear/watchface/WatchFace.OverlayStyle#OverlayStyle())()
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

### OverlayStyle

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.1.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.2.0)

```
public [OverlayStyle](https://developer.android.com/reference/androidx/wear/watchface/WatchFace.OverlayStyle#OverlayStyle(android.graphics.Color,android.graphics.Color))(Color backgroundColor, Color foregroundColor)
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

## Public methods

### equals

```
public boolean [equals](https://developer.android.com/reference/androidx/wear/watchface/WatchFace.OverlayStyle#equals(kotlin.Any))(Object other)
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

### getBackgroundColor

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.1.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.2.0)

```
public final Color [getBackgroundColor](https://developer.android.com/reference/androidx/wear/watchface/WatchFace.OverlayStyle#getBackgroundColor())()
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

The background color of the status indicator tray. This can be any color, including `https://developer.android.com/reference/android/graphics/Color.html#TRANSPARENT`. If this is `null` then the system default will be used.

### getForegroundColor

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.1.0) Deprecated in [1.2.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.2.0)

```
public final Color [getForegroundColor](https://developer.android.com/reference/androidx/wear/watchface/WatchFace.OverlayStyle#getForegroundColor())()
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

The background color of items rendered in the status indicator tray. If not `null` then this must be either `https://developer.android.com/reference/android/graphics/Color.html#BLACK` or `https://developer.android.com/reference/android/graphics/Color.html#WHITE`. If this is `null` then the system default will be used.

### hashCode

```
public int [hashCode](https://developer.android.com/reference/androidx/wear/watchface/WatchFace.OverlayStyle#hashCode())()
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff

### toString

```
public @NonNull String [toString](https://developer.android.com/reference/androidx/wear/watchface/WatchFace.OverlayStyle#toString())()
```

> [!CAUTION]
> **This method is deprecated.**   
> AndroidX watchface libraries are deprecated, use Watch Face Format instead. For more info see: https://developer.android.com/training/wearables/wff