# PlainComplicationText

# PlainComplicationText

Artifact:[androidx.wear.watchface:watchface-complications-data](https://developer.android.com/jetpack/androidx/releases/wear-watchface)  
[View Source](https://cs.android.com/search?q=file:androidx/wear/watchface/complications/data/Text.kt+class:androidx.wear.watchface.complications.data.PlainComplicationText)  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/wear-watchface#1.0.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/wear/watchface/complications/data/PlainComplicationText "View this page in Java")

<br />

```
class PlainComplicationText : ComplicationText
```

<br />

*** ** * ** ***

A[ComplicationText](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/ComplicationText)that contains plain text.

## Summary

|                                                                                                                                                    ### Nested types                                                                                                                                                     |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `class `[PlainComplicationText.Builder](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/PlainComplicationText.Builder) A builder for[PlainComplicationText](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/PlainComplicationText). |

|                                         ### Public functions                                          |
|-------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `open operator `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)   | [equals](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/PlainComplicationText#equals(kotlin.Any))`(other: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`?)`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `open `[Instant](https://developer.android.com/reference/java/time/Instant.html)                      | [getNextChangeTime](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/PlainComplicationText#getNextChangeTime(java.time.Instant))`(afterInstant: `[Instant](https://developer.android.com/reference/java/time/Instant.html)`)` Returns the next time after[afterInstant](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/PlainComplicationText#getNextChangeTime(java.time.Instant))at which the text may change.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `open `[CharSequence](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html) | [getTextAt](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/PlainComplicationText#getTextAt(android.content.res.Resources,java.time.Instant))`(resources: `[Resources](https://developer.android.com/reference/android/content/res/Resources.html)`, instant: `[Instant](https://developer.android.com/reference/java/time/Instant.html)`)` Returns the text that should be displayed for the given timestamp.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `open `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                    | [hashCode](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/PlainComplicationText#hashCode())`()`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `open `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)            | [isAlwaysEmpty](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/PlainComplicationText#isAlwaysEmpty())`()`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `open `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)            | [returnsSameText](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/PlainComplicationText#returnsSameText(java.time.Instant,java.time.Instant))`(firstInstant: `[Instant](https://developer.android.com/reference/java/time/Instant.html)`, secondInstant: `[Instant](https://developer.android.com/reference/java/time/Instant.html)`)` Returns true if the result of[getTextAt](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/PlainComplicationText#getTextAt(android.content.res.Resources,java.time.Instant))will be the same for both[firstInstant](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/PlainComplicationText#returnsSameText(java.time.Instant,java.time.Instant))and[secondInstant](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/PlainComplicationText#returnsSameText(java.time.Instant,java.time.Instant)). |
| `open `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)              | [toString](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/PlainComplicationText#toString())`()`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |

## Public functions

### equals

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

### getNextChangeTime

```
open fun getNextChangeTime(afterInstant: Instant): Instant
```

Returns the next time after[afterInstant](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/PlainComplicationText#getNextChangeTime(java.time.Instant))at which the text may change.  

### getTextAt

```
open fun getTextAt(resources: Resources, instant: Instant): CharSequence
```

Returns the text that should be displayed for the given timestamp.  

|                                              Parameters                                              |
|------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------|
| `resources: `[Resources](https://developer.android.com/reference/android/content/res/Resources.html) | [Resources](https://developer.android.com/reference/android/content/res/Resources.html)from the current context |
| `instant: `[Instant](https://developer.android.com/reference/java/time/Instant.html)                 | The[Instant](https://developer.android.com/reference/java/time/Instant.html)at which to sample the text         |

### hashCode

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

### isAlwaysEmpty

```
open fun isAlwaysEmpty(): Boolean
```  

### returnsSameText

```
open fun returnsSameText(firstInstant: Instant, secondInstant: Instant): Boolean
```

Returns true if the result of[getTextAt](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/PlainComplicationText#getTextAt(android.content.res.Resources,java.time.Instant))will be the same for both[firstInstant](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/PlainComplicationText#returnsSameText(java.time.Instant,java.time.Instant))and[secondInstant](https://developer.android.com/reference/kotlin/androidx/wear/watchface/complications/data/PlainComplicationText#returnsSameText(java.time.Instant,java.time.Instant)).  

### toString

```
open fun toString(): String
```