Diego
03/31/2023, 3:10 PMDiego
03/31/2023, 3:11 PM@Composable
fun SearchBar(
modifier: Modifier = Modifier,
onSearch: (String) -> Unit = {}
) {
var text by remember {
mutableStateOf("")
}
Box(modifier = modifier) {
BasicTextField(
value = text,
onValueChange = {
text = it
onSearch(it)
},
maxLines = 1,
singleLine = true,
textStyle = TextStyle(color = Color.Black),
modifier = Modifier
.fillMaxWidth()
.shadow(5.dp, CircleShape)
.background(Color.White, CircleShape)
)
}
}
That's the code of the screen aboveAltynbek Nurtaza
03/31/2023, 6:18 PMsingleLine = true,
but then i think it would scroll verticallyChris Fillmore
04/02/2023, 1:22 AMDiego
04/03/2023, 8:31 AMChris Fillmore
04/03/2023, 10:48 PMZach Klippenstein (he/him) [MOD]
04/04/2023, 6:26 PMDiego
04/04/2023, 6:35 PM