# PrecomputedTextCompat.Params

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

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/core/text/PrecomputedTextCompat.Params "View this page in Java")

<br />

```
class PrecomputedTextCompat.Params
```

<br />

*** ** * ** ***

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

## Summary

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

|                                                                                                                                                                                   ### Public constructors                                                                                                                                                                                    |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `@`[RequiresApi](https://developer.android.com/reference/kotlin/androidx/annotation/RequiresApi)`(value = 28)` [Params](https://developer.android.com/reference/kotlin/androidx/core/text/PrecomputedTextCompat.Params#Params(android.text.PrecomputedText.Params))`(wrapped: `[PrecomputedText.Params](https://developer.android.com/reference/android/text/PrecomputedText.Params.html)`)` |

|                                             ### Public functions                                              |
|---------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                           | [equals](https://developer.android.com/reference/kotlin/androidx/core/text/PrecomputedTextCompat.Params#equals(java.lang.Object))`(o: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`?)` Check if the same text layout.                                                                   |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                   | `@`[RequiresApi](https://developer.android.com/reference/kotlin/androidx/annotation/RequiresApi)`(value = 23)` [getBreakStrategy](https://developer.android.com/reference/kotlin/androidx/core/text/PrecomputedTextCompat.Params#getBreakStrategy())`()` Returns the break strategy for this text.                      |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                   | `@`[RequiresApi](https://developer.android.com/reference/kotlin/androidx/annotation/RequiresApi)`(value = 23)` [getHyphenationFrequency](https://developer.android.com/reference/kotlin/androidx/core/text/PrecomputedTextCompat.Params#getHyphenationFrequency())`()` Returns the hyphenation frequency for this text. |
| [TextDirectionHeuristic](https://developer.android.com/reference/android/text/TextDirectionHeuristic.html)`?` | [getTextDirection](https://developer.android.com/reference/kotlin/androidx/core/text/PrecomputedTextCompat.Params#getTextDirection())`()` Returns the[TextDirectionHeuristic](https://developer.android.com/reference/android/text/TextDirectionHeuristic.html)for this text.                                           |
| [TextPaint](https://developer.android.com/reference/android/text/TextPaint.html)                              | [getTextPaint](https://developer.android.com/reference/kotlin/androidx/core/text/PrecomputedTextCompat.Params#getTextPaint())`()` Returns the[TextPaint](https://developer.android.com/reference/android/text/TextPaint.html)for this text.                                                                             |
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                   | [hashCode](https://developer.android.com/reference/kotlin/androidx/core/text/PrecomputedTextCompat.Params#hashCode())`()`                                                                                                                                                                                               |
| [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!`                          | [toString](https://developer.android.com/reference/kotlin/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)
Params(wrapped: PrecomputedText.Params)
```  

## Public functions

### equals

```
fun equals(o: Any?): Boolean
```

Check if the same text layout.  

|                                       Returns                                       |
|-------------------------------------------------------------------------------------|-----------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | 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)  

```
@RequiresApi(value = 23)
fun getBreakStrategy(): Int
```

Returns the break strategy for this text. On API 22 and below, this returns 0.  

|                                   Returns                                   |
|-----------------------------------------------------------------------------|-------------------------|
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | the line break strategy |

### getHyphenationFrequency

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

```
@RequiresApi(value = 23)
fun getHyphenationFrequency(): Int
```

Returns the hyphenation frequency for this text. On API 22 and below, this returns 0.  

|                                   Returns                                   |
|-----------------------------------------------------------------------------|---------------------------|
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | the hyphenation frequency |

### getTextDirection

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

```
fun getTextDirection(): TextDirectionHeuristic?
```

Returns the[TextDirectionHeuristic](https://developer.android.com/reference/android/text/TextDirectionHeuristic.html)for this text. On API 17 and below, this returns null, otherwise returns non-null TextDirectionHeuristic.  

|                                                    Returns                                                    |
|---------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------|
| [TextDirectionHeuristic](https://developer.android.com/reference/android/text/TextDirectionHeuristic.html)`?` | the[TextDirectionHeuristic](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)  

```
fun getTextPaint(): TextPaint
```

Returns the[TextPaint](https://developer.android.com/reference/android/text/TextPaint.html)for this text.  

|                                     Returns                                      |
|----------------------------------------------------------------------------------|-----------------------------------------------------------------------------------|
| [TextPaint](https://developer.android.com/reference/android/text/TextPaint.html) | A[TextPaint](https://developer.android.com/reference/android/text/TextPaint.html) |

### hashCode

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

### toString

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