Rachel
Toggle table of contents
3.7.2
common
Target filter
common
Switch theme
Search in API
Skip to content
Rachel
love.yinlin.compose.ui
/
love.yinlin.compose.ui.text
/
InputState
Input
State
@
Stable
open
class
InputState
(
initText
:
String
=
""
,
maxLength
:
Int
=
Int.MAX_VALUE
,
maxLines
:
Int
=
1
,
minLines
:
Int
=
maxLines
,
imeAction
:
ImeAction
=
ImeAction.Done
)
Parameters
init
Text
初始文本
max
Length
最大长度
max
Lines
最大行
min
Lines
最小行
ime
Action
IME按钮类型
Inheritors
PasswordInputState
Members
Constructors
Input
State
Link copied to clipboard
constructor
(
initText
:
String
=
""
,
maxLength
:
Int
=
Int.MAX_VALUE
,
maxLines
:
Int
=
1
,
minLines
:
Int
=
maxLines
,
imeAction
:
ImeAction
=
ImeAction.Done
)
Properties
is
Empty
Link copied to clipboard
val
isEmpty
:
Boolean
是否内容为空
is
Full
Link copied to clipboard
val
isFull
:
Boolean
是否达到最大长度
is
Not
Empty
Link copied to clipboard
val
isNotEmpty
:
Boolean
是否内容不为空
is
Safe
Link copied to clipboard
val
isSafe
:
Boolean
是否有内容且未超出最大长度
text
Link copied to clipboard
var
text
:
String
设置输入框的文本内容
Functions
clear
Link copied to clipboard
fun
clear
(
)
清除输入状态
insert
Link copied to clipboard
fun
insert
(
newText
:
String
)
在当前光标位置插入文本
to
String
Link copied to clipboard
open
override
fun
toString
(
)
:
String