Jes*_*ill 5 android-jetpack-compose
我的用例是,我有一个表单,其中一些字段是手动填写的,其他字段将用户带到一个屏幕,他们可以在其中在一个大列表中搜索他们想要的值。仅接受用户输入的字段工作正常,但是当我尝试将属性添加readOnly = true到TextField可组合项时,出现以下错误:
None of the following functions can be called with the arguments supplied.\nTextField(TextFieldValue, (TextFieldValue) \xe2\x86\x92 Unit, Modifier = ..., TextStyle = ..., (() \xe2\x86\x92 Unit)? = ..., (() \xe2\x86\x92 Unit)? = ..., (() \xe2\x86\x92 Unit)? = ..., (() \xe2\x86\x92 Unit)? = ..., Boolean = ..., VisualTransformation = ..., KeyboardOptions = ..., Boolean = ..., Int = ..., (ImeAction, SoftwareKeyboardController?) \xe2\x86\x92 Unit = ..., (SoftwareKeyboardController) \xe2\x86\x92 Unit = ..., InteractionState = ..., Color = ..., Color = ..., Color = ..., Color = ..., Shape = ...) defined in androidx.compose.material\nTextField(String, (String) \xe2\x86\x92 Unit, Modifier = ..., TextStyle = ..., (() \xe2\x86\x92 Unit)? = ..., (() \xe2\x86\x92 Unit)? = ..., (() \xe2\x86\x92 Unit)? = ..., (() \xe2\x86\x92 Unit)? = ..., Boolean = ..., VisualTransformation = ..., KeyboardOptions = ..., Boolean = ..., Int = ..., (ImeAction, SoftwareKeyboardController?) \xe2\x86\x92 Unit = ..., (SoftwareKeyboardController) \xe2\x86\x92 Unit = ..., InteractionState = ..., Color = ..., Color = ..., Color = ..., Color = ..., Shape = ...) defined in androidx.compose.material\nRun Code Online (Sandbox Code Playgroud)\n我假设此错误与我的参数与提供的覆盖不匹配有关TextField,但我似乎无法在文档中找到任何内容来了解如何使用此属性,而不是简单地为其提供一个Boolean值。我正在看这里寻找文档。
代码是:
\nNone of the following functions can be called with the arguments supplied.\nTextField(TextFieldValue, (TextFieldValue) \xe2\x86\x92 Unit, Modifier = ..., TextStyle = ..., (() \xe2\x86\x92 Unit)? = ..., (() \xe2\x86\x92 Unit)? = ..., (() \xe2\x86\x92 Unit)? = ..., (() \xe2\x86\x92 Unit)? = ..., Boolean = ..., VisualTransformation = ..., KeyboardOptions = ..., Boolean = ..., Int = ..., (ImeAction, SoftwareKeyboardController?) \xe2\x86\x92 Unit = ..., (SoftwareKeyboardController) \xe2\x86\x92 Unit = ..., InteractionState = ..., Color = ..., Color = ..., Color = ..., Color = ..., Shape = ...) defined in androidx.compose.material\nTextField(String, (String) \xe2\x86\x92 Unit, Modifier = ..., TextStyle = ..., (() \xe2\x86\x92 Unit)? = ..., (() \xe2\x86\x92 Unit)? = ..., (() \xe2\x86\x92 Unit)? = ..., (() \xe2\x86\x92 Unit)? = ..., Boolean = ..., VisualTransformation = ..., KeyboardOptions = ..., Boolean = ..., Int = ..., (ImeAction, SoftwareKeyboardController?) \xe2\x86\x92 Unit = ..., (SoftwareKeyboardController) \xe2\x86\x92 Unit = ..., InteractionState = ..., Color = ..., Color = ..., Color = ..., Color = ..., Shape = ...) defined in androidx.compose.material\nRun Code Online (Sandbox Code Playgroud)\n我正在使用androidx.compose.material:material:1.0.0-alpha09Compose Material 包的版本alpha09我的其余 compose 依赖项。
| 归档时间: |
|
| 查看次数: |
3165 次 |
| 最近记录: |