# NotificationCompat.Metric.FixedText

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/app/NotificationCompat.java+class:androidx.core.app.NotificationCompat.Metric.FixedText) Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

*** ** * ** ***


```
class NotificationCompat.Metric.FixedText : NotificationCompat.Metric.MetricValue
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.core.app.NotificationCompat.Metric.MetricValue](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Metric.MetricValue) ||
|   | ↳ | [androidx.core.app.NotificationCompat.Metric.FixedText](https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Metric.FixedText) |

*** ** * ** ***

Metric corresponding to a text value.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Metric.FixedText#FixedText(java.lang.CharSequence)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html)` Creates a `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Metric.FixedText` instance with the specified text. |
| `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Metric.FixedText#FixedText(java.lang.CharSequence,java.lang.CharSequence)(value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html, unit: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?)` Creates a `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Metric.FixedText` instance with the specified text. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Metric.FixedText#equals(java.lang.Object)(obj: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!)` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Metric.FixedText#getUnit()()` A unit for the value. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Metric.FixedText#getValue()()` The text value. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Metric.FixedText#hashCode()()` |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Metric.FixedText#toString()()` |

## Public constructors

### FixedText

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
FixedText(value: CharSequence)
```

Creates a `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Metric.FixedText` instance with the specified text.

### FixedText

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
FixedText(value: CharSequence, unit: CharSequence?)
```

Creates a `https://developer.android.com/reference/kotlin/androidx/core/app/NotificationCompat.Metric.FixedText` instance with the specified text.

| Parameters |
|---|---|
| `value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html` | text value |
| `unit: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?` | optional unit for the value. Limit this to a few characters. |

## Public functions

### equals

```
fun equals(obj: Any!): Boolean
```

### getUnit

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
fun getUnit(): CharSequence?
```

A unit for the value.

This may not be shown to the user in all views.

The space allocated to this will be limited. It's recommended to limit this to just a few characters.

### getValue

Added in [1.19.1](https://developer.android.com/jetpack/androidx/releases/core#1.19.1)

```
fun getValue(): CharSequence
```

The text value.

### hashCode

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

### toString

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