KeyboardActions

interface KeyboardActions : ComposableProperties<ERROR CLASS: Symbol not found for androidx.compose.foundation.text.KeyboardActions>

用于定义当用户在软键盘上触发输入法编辑器(IME)操作时的行为。

此接口包装了 androidx.compose.foundation.text.KeyboardActions, 允许开发者在自动化脚本中为不同的键盘操作(如完成、下一步、搜索等)指定自定义的回调函数。

Author

M8Test, [email protected], https://m8test.com

See also

androidx.compose.foundation.text.KeyboardActions

Functions

Link copied to clipboard
abstract fun setOnDone(onDoneBuilder: () -> Unit)

设置当用户触发 androidx.compose.ui.text.input.ImeAction.Done 操作时要执行的回调。 Done 操作通常表示用户已完成当前输入字段的编辑。

Link copied to clipboard
abstract fun setOnGo(onGoBuilder: () -> Unit)

设置当用户触发 androidx.compose.ui.text.input.ImeAction.Go 操作时要执行的回调。 Go 操作通常用于指示导航到一个目标,例如在浏览器地址栏中输入网址后。

Link copied to clipboard
abstract fun setOnNext(onNextBuilder: () -> Unit)

设置当用户触发 androidx.compose.ui.text.input.ImeAction.Next 操作时要执行的回调。 默认行为是将焦点移动到下一个可聚焦的组件。

Link copied to clipboard
abstract fun setOnPrevious(onPreviousBuilder: () -> Unit)

设置当用户触发 androidx.compose.ui.text.input.ImeAction.Previous 操作时要执行的回调。 默认行为是将焦点移动到上一个可聚焦的组件。

Link copied to clipboard
abstract fun setOnSearch(onSearchBuilder: () -> Unit)

设置当用户触发 androidx.compose.ui.text.input.ImeAction.Search 操作时要执行的回调。 此操作通常出现在搜索输入框中。

Link copied to clipboard
abstract fun setOnSend(onSendBuilder: () -> Unit)

设置当用户触发 androidx.compose.ui.text.input.ImeAction.Send 操作时要执行的回调。 此操作通常用于发送消息或提交内容。