答案 0 :(得分:0)
如果要创建类似的UI,只需使用FlexRow创建组件。
FlexRow(crossAxisAlignment = CrossAxisAlignment.Start) {
inflexible {
drawImageResource(R.drawable.image_search)
}
expanded(1.0f) {
SingleLineEditText(
state,
keyboardType = KeyboardType.Text,
imeAction = ImeAction.Search,
editorStyle = EditorStyle(textStyle = TextStyle(fontSize = 16.sp)),
onImeActionPerformed = {
onSearch(state.value.text)
}
)
}
}
答案 1 :(得分:0)
TextField(
startingIcon = Icon(bitmap = searchIcon),
placeholder = { Text(...) }
)