Stay organized with collections
Save and categorize content based on your preferences.
TextInputLayout.LengthCounter
public
static
interface
TextInputLayout.LengthCounter
com.google.android.material.textfield.TextInputLayout.LengthCounter
|
Interface definition for a length counter.
Summary
Public methods |
abstract
int
|
countLength(Editable text)
Counts the length of the text and returns it.
|
Public methods
countLength
public abstract int countLength (Editable text)
Counts the length of the text and returns it.
Parameters |
text |
Editable : The text to count the length for. |
Returns |
int |
The count that the counter should be updated with.
|
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# TextInputLayout.LengthCounter\n=============================\n\n\n`\npublic\nstatic\n\n\ninterface\nTextInputLayout.LengthCounter\n`\n\n\n`\n\n\n`\n\n|---------------------------------------------------------------------|\n| com.google.android.material.textfield.TextInputLayout.LengthCounter |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nInterface definition for a length counter.\n\nSummary\n-------\n\n| ### Public methods ||\n|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract int` | ` `[countLength](/reference/com/google/android/material/textfield/TextInputLayout.LengthCounter#countLength(android.text.Editable))`(Editable text) ` Counts the length of the text and returns it. |\n\nPublic methods\n--------------\n\n### countLength\n\n```\npublic abstract int countLength (Editable text)\n```\n\nCounts the length of the text and returns it.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------|------------------------------------------------------|\n| `text` | `Editable`: The text to count the length for. \u003cbr /\u003e |\n\n| Returns ||\n|-------|-----------------------------------------------------------|\n| `int` | The count that the counter should be updated with. \u003cbr /\u003e |"]]