# PrecomputedTextCompat.Params

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/text/PrecomputedTextCompat.java+class:androidx.core.text.PrecomputedTextCompat.Params) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

*** ** * ** ***


```
public final class PrecomputedTextCompat.Params
```

<br />

*** ** * ** ***

The information required for building `https://developer.android.com/reference/androidx/core/text/PrecomputedTextCompat`. Contains information required for precomputing text measurement metadata, so it can be done in isolation of a `https://developer.android.com/reference/android/widget/TextView.html` or `https://developer.android.com/reference/android/text/StaticLayout.html`, when final layout constraints are not known.

## Summary

| ### Nested types |
|---|
| `public class https://developer.android.com/reference/androidx/core/text/PrecomputedTextCompat.Params.Builder` A builder for creating `https://developer.android.com/reference/androidx/core/text/PrecomputedTextCompat.Params`. |

| ### Public constructors |
|---|
| `@https://developer.android.com/reference/androidx/annotation/RequiresApi(value = 28) https://developer.android.com/reference/androidx/core/text/PrecomputedTextCompat.Params#Params(android.text.PrecomputedText.Params)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/text/PrecomputedText.Params.html wrapped)` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/core/text/PrecomputedTextCompat.Params#equals(java.lang.Object)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/java/lang/Object.html o)` Check if the same text layout. |
| `int` | `https://developer.android.com/reference/androidx/core/text/PrecomputedTextCompat.Params#getBreakStrategy()()` Returns the break strategy for this text. |
| `int` | `https://developer.android.com/reference/androidx/core/text/PrecomputedTextCompat.Params#getHyphenationFrequency()()` Returns the hyphenation frequency for this text. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/text/TextDirectionHeuristic.html` | `https://developer.android.com/reference/androidx/core/text/PrecomputedTextCompat.Params#getTextDirection()()` Returns the `https://developer.android.com/reference/android/text/TextDirectionHeuristic.html` for this text. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/text/TextPaint.html` | `https://developer.android.com/reference/androidx/core/text/PrecomputedTextCompat.Params#getTextPaint()()` Returns the `https://developer.android.com/reference/android/text/TextPaint.html` for this text. |
| `int` | `https://developer.android.com/reference/androidx/core/text/PrecomputedTextCompat.Params#hashCode()()` |
| `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/core/text/PrecomputedTextCompat.Params#toString()()` |

## Public constructors

### Params

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

```
@RequiresApi(value = 28)
public Params(@NonNull PrecomputedText.Params wrapped)
```

## Public methods

### equals

```
public boolean equals(@Nullable Object o)
```

Check if the same text layout.

| Returns |
|---|---|
| `boolean` | true if this and the given param result in the same text layout |

### getBreakStrategy

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

```
public int getBreakStrategy()
```

Returns the break strategy for this text.

| Returns |
|---|---|
| `int` | the line break strategy |

### getHyphenationFrequency

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

```
public int getHyphenationFrequency()
```

Returns the hyphenation frequency for this text.

| Returns |
|---|---|
| `int` | the hyphenation frequency |

### getTextDirection

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

```
public @Nullable TextDirectionHeuristic getTextDirection()
```

Returns the `https://developer.android.com/reference/android/text/TextDirectionHeuristic.html` for this text.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/text/TextDirectionHeuristic.html` | the `https://developer.android.com/reference/android/text/TextDirectionHeuristic.html` |

### getTextPaint

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

```
public @NonNull TextPaint getTextPaint()
```

Returns the `https://developer.android.com/reference/android/text/TextPaint.html` for this text.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/text/TextPaint.html` | A `https://developer.android.com/reference/android/text/TextPaint.html` |

### hashCode

```
public int hashCode()
```

### toString

```
public String toString()
```