# 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)

*** ** * ** ***


```
public final class NotificationCompat.Metric.FixedText extends NotificationCompat.Metric.MetricValue
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.core.app.NotificationCompat.Metric.MetricValue](https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.MetricValue) ||
|   | ↳ | [androidx.core.app.NotificationCompat.Metric.FixedText](https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedText) |

*** ** * ** ***

Metric corresponding to a text value.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedText#FixedText(java.lang.CharSequence)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/CharSequence.html value)` Creates a `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedText` instance with the specified text. |
| `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedText#FixedText(java.lang.CharSequence,java.lang.CharSequence)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/CharSequence.html value, @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html unit)` Creates a `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedText` instance with the specified text. |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedText#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object.html obj)` |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html` | `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedText#getUnit()()` A unit for the value. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/CharSequence.html` | `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedText#getValue()()` The text value. |
| `int` | `https://developer.android.com/reference/androidx/core/app/NotificationCompat.Metric.FixedText#hashCode()()` |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/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)

```
public FixedText(@NonNull CharSequence value)
```

Creates a `https://developer.android.com/reference/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)

```
public FixedText(@NonNull CharSequence value, @Nullable CharSequence unit)
```

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

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/java/lang/CharSequence.html value` | text value |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/CharSequence.html unit` | optional unit for the value. Limit this to a few characters. |

## Public methods

### equals

```
public boolean equals(Object obj)
```

### getUnit

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

```
public @Nullable CharSequence getUnit()
```

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)

```
public @NonNull CharSequence getValue()
```

The text value.

### hashCode

```
public int hashCode()
```

### toString

```
public @NonNull String toString()
```