-
Notifications
You must be signed in to change notification settings - Fork 234
Migrate to TopSearchBar #2148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Migrate to TopSearchBar #2148
Conversation
| isRefreshing = isRefreshing, | ||
| modifier = Modifier.align(Alignment.TopCenter).padding(top = contentPadding.calculateTopPadding()) | ||
| .offset { IntOffset(0, searchBarOffsetY()) }, | ||
| modifier = with(scrollBehavior) { Modifier.align(Alignment.TopCenter).padding(top = contentPadding.calculateTopPadding()).offset { IntOffset(0, scrollBehavior.scrollOffset.roundToInt()) } }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| modifier = with(scrollBehavior) { Modifier.align(Alignment.TopCenter).padding(top = contentPadding.calculateTopPadding()).offset { IntOffset(0, scrollBehavior.scrollOffset.roundToInt()) } }, | |
| modifier = Modifier.align(Alignment.TopCenter).padding(top = contentPadding.calculateTopPadding()).offset { IntOffset(0, scrollBehavior.scrollOffset.roundToInt()) }, |
| fabHidden = it | ||
| }, | ||
| title = suitableTitle, | ||
| searchFieldHint = searchBarHint, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| searchFieldHint = searchBarHint, | |
| searchFieldHint = searchBarHint, | |
| searchBarState = searchBarState, | |
| scrollBehavior = scrollBehavior, |
| fun AnimatedVisibilityScope.GalleryListScreen(lub: ListUrlBuilder, navigator: DestinationsNavigator) = Screen(navigator) { | ||
| val searchFieldState = rememberTextFieldState() | ||
| val searchBarState = rememberSearchBarState() | ||
| val scrollBehaviour = SearchBarDefaults.enterAlwaysSearchBarScrollBehavior() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| val scrollBehaviour = SearchBarDefaults.enterAlwaysSearchBarScrollBehavior() | |
| val scrollBehavior = SearchBarDefaults.enterAlwaysSearchBarScrollBehavior() |
| onSearch = { | ||
| hideSearchView() | ||
| onApplySearch() | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| }, | |
| }, | |
| modifier = Modifier.widthIn(max = M3SearchBarMaxWidth).fillMaxWidth(), |
| topBar = { | ||
| TopSearchBar( | ||
| state = searchBarState, | ||
| inputField = inputField, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| inputField = inputField, | |
| inputField = inputField, | |
| modifier = Modifier.padding(horizontal = 8.dp), |
| ) | ||
| ExpandedFullScreenSearchBar( | ||
| state = searchBarState, | ||
| inputField = inputField, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| inputField = inputField, | |
| inputField = inputField, | |
| windowInsets = { SearchBarDefaults.windowInsets }, |
| trailingContent = it.canDelete.ifTrueThen { | ||
| IconButton(onClick = { deleteKeyword(it.keyword) }) { | ||
| filter?.invoke() | ||
| LazyColumn(modifier = Modifier.fillMaxSize()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| LazyColumn(modifier = Modifier.fillMaxSize()) { | |
| LazyColumn( | |
| modifier = Modifier.fillMaxSize(), | |
| contentPadding = WindowInsets.safeDrawing.only(WindowInsetsSides.Bottom).asPaddingValues(), | |
| ) { |
No description provided.