Google은 흑인 공동체를 위한 인종 간 평등을 진전시키기 위해 노력하고 있습니다. Google에서 어떤 노력을 하고 있는지 확인하세요.

androidx.compose.ui.text.input

Interfaces

EditCommand

EditCommand is a command representation for the platform IME API function calls.

InputEventCallback

An interface of listening IME events.

OffsetMapping

Provides bidirectional offset mapping between original and transformed text.

PlatformTextInputService

Platform specific text input service.

VisualTransformation

Classes

BackspaceCommand

Represents a backspace operation at the cursor position.

CommitTextCommand

Commit final text to the text box and set the new cursor position.

DeleteAllCommand

Deletes all the text in the buffer.

DeleteSurroundingTextCommand

Delete lengthBeforeCursor characters of text before the current cursor position, and delete lengthAfterCursor characters of text after the current cursor position, excluding the selection.

DeleteSurroundingTextInCodePointsCommand

A variant of DeleteSurroundingTextCommand.

EditingBuffer

The editing buffer

EditProcessor

Helper class to apply EditCommands on an internal buffer.

FinishComposingTextCommand

Finishes the composing text that is currently active.

ImeOptions

The IME configuration options for TextInputService.

MoveCursorCommand

Moves the cursor with amount characters.

PasswordVisualTransformation

The Visual Filter can be used for password Input Field.

SetComposingRegionCommand

Mark a certain region of text as composing text.

SetComposingTextCommand

Replace the currently composing text with the given text, and set the new cursor position.

SetSelectionCommand

Sets the selection on the text.

TextFieldValue

A class holding information about the editing state.

TextInputService

Handles communication with the IME.

TextInputSession

Represents a input session for interactions between a soft keyboard and editable text.

TransformedText

The transformed text with offset offset mapping

Enums

ImeAction

Signals the keyboard what type of action should be displayed.

KeyboardCapitalization

Options to request software keyboard to capitalize the text.

KeyboardType

Enums used for indicating keyboard types

Top-level functions summary

Unit

Interface used for changing visual output of the input field.

Extension functions summary

For TextFieldValue
AnnotatedString

Returns the currently selected text.

AnnotatedString

Returns the text after the selection.

AnnotatedString

Returns the text before the selection.

Top-level functions

<no name provided>

@Immutable fun <no name provided>(): Unit

Interface used for changing visual output of the input field.

This interface can be used for changing visual output of the text in the input field. For example, you can mask characters in password filed with asterisk with PasswordVisualTransformation.

Extension functions

getSelectedText

fun TextFieldValue.getSelectedText(): AnnotatedString

Returns the currently selected text.

getTextAfterSelection

fun TextFieldValue.getTextAfterSelection(maxChars: Int): AnnotatedString

Returns the text after the selection.

Parameters
maxChars: Int maximum number of characters (exclusive) after the maximum value in TextFieldValue.selection.

See Also

getTextBeforeSelection

fun TextFieldValue.getTextBeforeSelection(maxChars: Int): AnnotatedString

Returns the text before the selection.

Parameters
maxChars: Int maximum number of characters (inclusive) before the minimum value in TextFieldValue.selection.

See Also