Fixed
Status Update
Comments
lu...@gmail.com <lu...@gmail.com> #2
Comment has been deleted.
ma...@google.com <ma...@google.com> #3
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.foundation:foundation:1.8.0-alpha06
androidx.compose.foundation:foundation-android:1.8.0-alpha06
androidx.compose.foundation:foundation-jvmstubs:1.8.0-alpha06
androidx.compose.foundation:foundation-linuxx64stubs:1.8.0-alpha06
lu...@gmail.com <lu...@gmail.com> #4
The outside of the visual surface as per your second screenshot. If you add horizontal padding for example to the SearchBar then when it's expanded the expanded view also has the horizontal padding and it doesn't cover the full width of the screen anymore
ma...@google.com <ma...@google.com>
so...@gmail.com <so...@gmail.com> #5
Comment has been deleted.
so...@gmail.com <so...@gmail.com> #6
SearchBar isn't following the material design specs. As per specs when the Search Bar is collapsed it should have some horizontal padding and when it is expanded to the Search View it should cover the entire screen. I have also attached the desired behaviour.
But if you implement the current compose SearchBar, it doesn't have any horizontal padding during the collapsed state and the SearchBar covers the entire width. But if you set a padding modifier, it also affects the expanded Search View, which is undesirable.
But if you implement the current compose SearchBar, it doesn't have any horizontal padding during the collapsed state and the SearchBar covers the entire width. But if you set a padding modifier, it also affects the expanded Search View, which is undesirable.
ap...@google.com <ap...@google.com> #7
Project: platform/frameworks/support
Branch: androidx-main
Author: Max Alfonso-Ying <
Link:
Publish new search bar APIs.
Expand for full commit details
Publish new search bar APIs.
Samples have also been updated.
Bug: b/261496232, b/263130999, b/283311462, b/350916229, b/352872248
Test: manually + existing unit/screenshot tests
Relnote: """New search bar APIs:
* Collapsed search bars and expanded search "views" are now
separate composables.
* `SearchBar` represents a search bar in the collapsed state.
* `ExpandedFullScreenSearchBar` and `ExpandedDockedSearchBar`
represent the search bar in the expanded state. These open
in a new window.
* `SearchBarState` to control the state of the search bar
* `TopSearchBar` to add insets handling and scroll behavior
* New overload of `InputField` which uses `SearchBarState`
"""
Change-Id: Ie0723015eddd66c82f420481dc6f366a7e26f4a8
Files:
- M
compose/material3/material3/api/current.txt
- M
compose/material3/material3/api/restricted_current.txt
- M
compose/material3/material3/integration-tests/material3-catalog/src/main/java/androidx/compose/material3/catalog/library/model/Examples.kt
- M
compose/material3/material3/samples/src/main/java/androidx/compose/material3/samples/SearchBarSamples.kt
- M
compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/SearchBarScreenshotTest.kt
- M
compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/SearchBar.kt
Hash: 2c46cabd287091ae4a47a7309f2f3eb19930c754
Date: Tue Jan 21 18:19:22 2025
ma...@google.com <ma...@google.com>
ma...@google.com <ma...@google.com> #8
New search bar APIs will be released in an upcoming version with separate components for collapsed and expanded search bars, so you will be able to add padding to one and not the other. Please try the new search bar once it is released and see if it covers your use case.
pr...@google.com <pr...@google.com> #9
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.material3:material3:1.4.0-alpha08
androidx.compose.material3:material3-android:1.4.0-alpha08
androidx.compose.material3:material3-jvmstubs:1.4.0-alpha08
androidx.compose.material3:material3-linuxx64stubs:1.4.0-alpha08
androidx.core:core-viewtree:1.0.0-rc01
Description
Jetpack Compose version: 2024.06.00 bom
Material Library Version (M2, M3 or Both?): M3
Material Compose component used: SearchBar
Android Studio Build: 2024.1.1 Patch 1
Kotlin version: 2.0
Steps to Reproduce or Code Sample to Reproduce:
There should be a way to add padding to the SearchBar without affecting the active expanded view, ideally via a parameter on the SearchBar Composable. Screenshots attached.