---
title: "getTextLayoutResult"
description: "Action to get a Text/TextField node's [TextLayoutResult]. The result is the first element of
layout (the argument of the AccessibilityAction)."
type: "function"
---

<div class='type'>Function</div>


<a id='references'></a>
<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun SemanticsPropertyReceiver.getTextLayoutResult(
    label: String? = null,
    action: ((MutableList<TextLayoutResult>) -> Boolean)?,
)
```


Action to get a Text/TextField node's `TextLayoutResult`. The result is the first element of
layout (the argument of the AccessibilityAction).

#### Parameters

| | |
| --- | --- |
| label | Optional label for this action. |
| action | Action to be performed when the `SemanticsActions.GetTextLayoutResult` is called. |




