# PrecomputedText.Params

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# Params

*** ** * ** ***

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

```
class Params
```

|---|----------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                             ||
| ↳ | [android.text.PrecomputedText.Params](https://developer.android.com/reference/kotlin/android/text/PrecomputedText.Params#) |

The information required for building[PrecomputedText](https://developer.android.com/reference/kotlin/android/text/PrecomputedText). 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/kotlin/android/widget/TextView.html#)or[StaticLayout](https://developer.android.com/reference/kotlin/android/text/StaticLayout), when final layout constraints are not known.

## Summary

|                                                                                                        Nested classes                                                                                                         ||
|---|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|   | [Builder](https://developer.android.com/reference/kotlin/android/text/PrecomputedText.Params.Builder) A builder for creating[Params](https://developer.android.com/reference/kotlin/android/text/PrecomputedText.Params#). |

|                                                                                                                                                                                     Public methods                                                                                                                                                                                      ||
|---------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                            | [equals](https://developer.android.com/reference/kotlin/android/text/PrecomputedText.Params#equals(kotlin.Any))`(`other:` `[Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)?`)` Check if the same text layout.                                 |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                    | [getBreakStrategy](https://developer.android.com/reference/kotlin/android/text/PrecomputedText.Params#getBreakStrategy())`()` Returns the break strategy for this text.                                                                                                  |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                    | [getHyphenationFrequency](https://developer.android.com/reference/kotlin/android/text/PrecomputedText.Params#getHyphenationFrequency())`()` Returns the hyphenation frequency for this text.                                                                             |
| [LineBreakConfig](https://developer.android.com/reference/kotlin/android/graphics/text/LineBreakConfig.html#) | [getLineBreakConfig](https://developer.android.com/reference/kotlin/android/text/PrecomputedText.Params#getLineBreakConfig())`()` Returns the[LineBreakConfig](https://developer.android.com/reference/kotlin/android/graphics/text/LineBreakConfig.html#)for this text. |
| [TextDirectionHeuristic](https://developer.android.com/reference/kotlin/android/text/TextDirectionHeuristic)  | [getTextDirection](https://developer.android.com/reference/kotlin/android/text/PrecomputedText.Params#getTextDirection())`()` Returns the[TextDirectionHeuristic](https://developer.android.com/reference/kotlin/android/text/TextDirectionHeuristic)for this text.      |
| [TextPaint](https://developer.android.com/reference/kotlin/android/text/TextPaint)                            | [getTextPaint](https://developer.android.com/reference/kotlin/android/text/PrecomputedText.Params#getTextPaint())`()` Returns the[TextPaint](https://developer.android.com/reference/kotlin/android/text/TextPaint)for this text.                                        |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                    | [hashCode](https://developer.android.com/reference/kotlin/android/text/PrecomputedText.Params#hashCode())`()` <br />                                                                                                                                                     |
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)                              | [toString](https://developer.android.com/reference/kotlin/android/text/PrecomputedText.Params#toString())`()` <br />                                                                                                                                                     |

## Public methods

### equals

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

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

Check if the same text layout.

|                     Parameters                     ||
|-------|---------------------------------------------|
| `obj` | the reference object with which to compare. |
| `o`   | This value may be`null`.                    |

|                                                                       Return                                                                        ||
|------------------------------------------------------------------------------------|-----------------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | true if this and the given param result in the same text layout |

### getBreakStrategy

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun getBreakStrategy(): Int
```

Returns the break strategy for this text.

|                                                                                                                                                                                                                                                                                                                                       Return                                                                                                                                                                                                                                                                                                                                       ||
|----------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | A line break strategy Value is[android.graphics.text.LineBreaker#BREAK_STRATEGY_SIMPLE](https://developer.android.com/reference/kotlin/android/graphics/text/LineBreaker.html#BREAK_STRATEGY_SIMPLE:kotlin.Int),[android.graphics.text.LineBreaker#BREAK_STRATEGY_HIGH_QUALITY](https://developer.android.com/reference/kotlin/android/graphics/text/LineBreaker.html#BREAK_STRATEGY_HIGH_QUALITY:kotlin.Int), or[android.graphics.text.LineBreaker#BREAK_STRATEGY_BALANCED](https://developer.android.com/reference/kotlin/android/graphics/text/LineBreaker.html#BREAK_STRATEGY_BALANCED:kotlin.Int) |

### getHyphenationFrequency

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun getHyphenationFrequency(): Int
```

Returns the hyphenation frequency for this text.

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                      Return                                                                                                                                                                                                                                                                                                                                                                                                                                                                       ||
|----------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | A hyphenation frequency Value is[android.text.Layout#HYPHENATION_FREQUENCY_NORMAL](https://developer.android.com/reference/kotlin/android/text/Layout#HYPHENATION_FREQUENCY_NORMAL:kotlin.Int),[android.text.Layout#HYPHENATION_FREQUENCY_NORMAL_FAST](https://developer.android.com/reference/kotlin/android/text/Layout#HYPHENATION_FREQUENCY_NORMAL_FAST:kotlin.Int),[android.text.Layout#HYPHENATION_FREQUENCY_FULL](https://developer.android.com/reference/kotlin/android/text/Layout#HYPHENATION_FREQUENCY_FULL:kotlin.Int),[android.text.Layout#HYPHENATION_FREQUENCY_FULL_FAST](https://developer.android.com/reference/kotlin/android/text/Layout#HYPHENATION_FREQUENCY_FULL_FAST:kotlin.Int), or[android.text.Layout#HYPHENATION_FREQUENCY_NONE](https://developer.android.com/reference/kotlin/android/text/Layout#HYPHENATION_FREQUENCY_NONE:kotlin.Int) |

### getLineBreakConfig

Added in[API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
fun getLineBreakConfig(): LineBreakConfig
```

Returns the[LineBreakConfig](https://developer.android.com/reference/kotlin/android/graphics/text/LineBreakConfig.html#)for this text.

|                                                                                                                                                                                    Return                                                                                                                                                                                    ||
|---------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [LineBreakConfig](https://developer.android.com/reference/kotlin/android/graphics/text/LineBreakConfig.html#) | the current line break configuration. The[LineBreakConfig](https://developer.android.com/reference/kotlin/android/graphics/text/LineBreakConfig.html#)with default values will be returned if no line break configuration is set. This value cannot be`null`. |

### getTextDirection

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

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

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

|                                                                                                                         Return                                                                                                                         ||
|--------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------|
| [TextDirectionHeuristic](https://developer.android.com/reference/kotlin/android/text/TextDirectionHeuristic) | A[TextDirectionHeuristic](https://developer.android.com/reference/kotlin/android/text/TextDirectionHeuristic)This value cannot be`null`. |

### getTextPaint

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

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

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

|                                                                                               Return                                                                                               ||
|------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------|
| [TextPaint](https://developer.android.com/reference/kotlin/android/text/TextPaint) | A[TextPaint](https://developer.android.com/reference/kotlin/android/text/TextPaint)This value cannot be`null`. |

### hashCode

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

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

|                                                     Return                                                     ||
|----------------------------------------------------------------------------|------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | a hash code value for this object. |

### toString

Added in[API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

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

|                                                          Return                                                          ||
|----------------------------------------------------------------------------------|----------------------------------------|
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | a string representation of the object. |