# TextInputLayout.LengthCounter

[View Source](https://github.com/material-components/material-components-android/blob/1.14.0/lib/java/com/google/android/material/textfield/TextInputLayout.java)

*** ** * ** ***


```
public interface TextInputLayout.LengthCounter
```

<br />

*** ** * ** ***

Interface definition for a length counter.

## Summary

| ### Public methods |
|---|---|
| `abstract int` | `https://developer.android.com/reference/com/google/android/material/textfield/TextInputLayout.LengthCounter#countLength(Editable)(Editable text)` Counts the length of the text and returns it. |

## Public methods

### countLength

```
abstract int countLength(Editable text)
```

Counts the length of the text and returns it.

| Parameters |
|---|---|
| `Editable text` | The text to count the length for. |

| Returns |
|---|---|
| `int` | The count that the counter should be updated with. |