Update Search Bar Ui
This commit is contained in:
parent
6f55430a1d
commit
f90696d3d3
1 changed files with 15 additions and 6 deletions
|
|
@ -57,7 +57,13 @@ class HomeScreen: Screen {
|
||||||
val navigator = LocalNavigator.currentOrThrow
|
val navigator = LocalNavigator.currentOrThrow
|
||||||
val coroutineScope = rememberCoroutineScope()
|
val coroutineScope = rememberCoroutineScope()
|
||||||
var searchQuery by remember { mutableStateOf("") }
|
var searchQuery by remember { mutableStateOf("") }
|
||||||
Box(modifier = Modifier.background(color = orange).fillMaxSize()) {
|
val yellow = Color(0xFFFFD700)
|
||||||
|
Column(
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxSize()
|
||||||
|
.background(color = orange),
|
||||||
|
horizontalAlignment = Alignment.CenterHorizontally
|
||||||
|
) {
|
||||||
OutlinedTextField(
|
OutlinedTextField(
|
||||||
value = searchQuery,
|
value = searchQuery,
|
||||||
onValueChange = { newName -> searchQuery = newName },
|
onValueChange = { newName -> searchQuery = newName },
|
||||||
|
|
@ -84,8 +90,7 @@ class HomeScreen: Screen {
|
||||||
println(names)
|
println(names)
|
||||||
println(newMap)
|
println(newMap)
|
||||||
if (newMap.isNotEmpty()) {
|
if (newMap.isNotEmpty()) {
|
||||||
pokemap.clear()
|
pokemap = newMap
|
||||||
pokemap.addAll(newMap)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -96,11 +101,15 @@ class HomeScreen: Screen {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
colors = TextFieldDefaults.outlinedTextFieldColors(
|
colors = TextFieldDefaults.outlinedTextFieldColors(
|
||||||
focusedBorderColor = Color(0xFFffa500), // Orange color
|
focusedBorderColor = yellow,
|
||||||
unfocusedBorderColor = Color(0xFFffa500), // Orange color
|
unfocusedBorderColor = yellow,
|
||||||
textColor = Color.Black
|
textColor = Color.Black,
|
||||||
|
cursorColor = orange,
|
||||||
|
focusedLabelColor = orange,
|
||||||
|
unfocusedLabelColor = orange,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
Spacer(modifier = Modifier.height(16.dp))
|
||||||
//Grid
|
//Grid
|
||||||
LazyVerticalGrid(
|
LazyVerticalGrid(
|
||||||
columns = GridCells.Adaptive(minSize = 256.dp),
|
columns = GridCells.Adaptive(minSize = 256.dp),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue