Skip to content

Commit

Permalink
update ui: add limit, improve ui
Browse files Browse the repository at this point in the history
  • Loading branch information
nqmgaming committed Jun 4, 2024
1 parent 905f695 commit 30b1ca6
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.shadow
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.layout.onGloballyPositioned
Expand Down Expand Up @@ -150,7 +151,7 @@ fun SearchScreen(
}


LaunchedEffect(listState.firstVisibleItemIndex) {
LaunchedEffect(remember { derivedStateOf { listState.firstVisibleItemIndex } }) {
// if user scroll then hide keyboard
keyboardController?.hide()
}
Expand Down Expand Up @@ -207,6 +208,10 @@ fun SearchScreen(
width = 1.dp,
color = Color.Gray.copy(alpha = 0.1f),
shape = RoundedCornerShape(30.dp)
)
.shadow(
elevation = 2.dp,
shape = RoundedCornerShape(30.dp)
),
colors = TextFieldDefaults.colors(
focusedIndicatorColor = Color.Transparent,
Expand All @@ -223,8 +228,7 @@ fun SearchScreen(
keyboardController?.hide()
}
),

)
)
LazyColumn(
state = listState,
modifier = Modifier
Expand Down

0 comments on commit 30b1ca6

Please sign in to comment.