19 Commits

Author SHA1 Message Date
rightnao
5a600a86d5 [Search] Added a clip bounds animation for searchview edit text
PiperOrigin-RevId: 753331382
2025-05-02 15:54:25 +00:00
rightnao
be09936c88 [Search] Add a placeholder textview to Searchbar that keeps track of searchview edit text in order to gracefully fade it out in searchview collapse animation
PiperOrigin-RevId: 752904135
2025-04-30 17:51:14 +00:00
rightnao
53616ad822 [SearchBar] Add cutout insets to SearchView toolbar
PiperOrigin-RevId: 745270784
2025-04-17 23:54:16 +00:00
rightnao
44eabe31b8 [SearchBar] Fix animation calculations for predictive back
PiperOrigin-RevId: 743652844
2025-04-07 14:34:18 +00:00
rightnao
548c15cb40 [SearchBar][SearchView] Add maxWidth attribute and fix SearchBar/SearchView animations to be more flexible in hierarchy
PiperOrigin-RevId: 742311708
2025-04-03 19:23:16 +00:00
rightnao
e035f386bf [SearchBar][SearchView] Set alpha for toolbar button directly rather than setting through a FadeThroughDrawable
PiperOrigin-RevId: 735925620
2025-03-17 18:51:35 +00:00
rightnao
ea01f2ac1f [Searchbar] Fix centering text when set by the search view
PiperOrigin-RevId: 735817759
2025-03-17 18:38:07 +00:00
rightnao
f7ba9c6f19 [Searchbar][Searchview] Fix animation when searchbar doesn't cover whole screen
PiperOrigin-RevId: 733852521
2025-03-11 17:49:30 +00:00
dsn5ft
3ce7c2bb18 [SearchBar] Update predictive back device corner logic to handle each corner independently to fix issue where bottom corners are incorrectly rounded after canceling back gesture
PiperOrigin-RevId: 677788624
2024-09-23 15:10:54 +00:00
pubiqq
510881a469 [Internal] Stop using deprecated androidx.core.view.* methods
Resolves https://github.com/material-components/material-components-android/pull/4117

GIT_ORIGIN_REV_ID=dd157e8360c2511810496693cec1616fce578655
PiperOrigin-RevId: 632284856
2024-05-13 17:37:38 +00:00
dsn5ft
b77b1412a3 [Search] Add start delay to scrim animation during SearchBar to SearchView expand to reduce visual noise
PiperOrigin-RevId: 623875803
2024-04-11 20:07:18 +00:00
afohrman
f10153257f [Predictive Back][Search] Fixed UnsupportedOperationException AnimatorSet crash in SearchView.
When navigation icon animation is disabled after the predictive back navigation icon animators are initialized, a strange crash happens in `SearchViewAnimatorSet#updateBackProgress` from the call to `AnimatorSet#setCurrentPlayTime()`, in which the button progress `AnimatorSet` duration is 250 but the total duration is 0. This triggers an [`UnsupportedOperationException`](https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/animation/AnimatorSet.java#928) with the message: `"Error: Play time should always be in between 0 and duration."`.

Adding an early return from `SearchViewAnimatorSet#updateBackProgress` when navigation animation is disabled appears to fix the crash.

PiperOrigin-RevId: 550885523
2023-07-26 17:13:18 +00:00
hunterstich
a67a885668 [Predictive Back] Update components to use BackEventCompat
Clients should prefer listening to back events using androidx.activity.OnBackPressedCallback which has been updated to forward BackEventCompat objects in androidx.activity:activity:1.8.0-alpha05. This updates component predictive back APIs to take in BackEventCompat objects instead of android.window.BackEvent objects to simplify usage - getting rid of the need for version checks and object conversions.

PiperOrigin-RevId: 540290323
2023-06-14 12:44:53 -07:00
dsn5ft
e69a324a2f [Predictive Back][Search] Fix issue on Android U where clicking SearchView back button causes SearchBar to disappear and back arrow animation to not run
PiperOrigin-RevId: 536876120
2023-06-05 18:25:48 +00:00
dsn5ft
577d23eceb [Search] Fix expand/collapse animation for non-predictive back cases where rootView bounds are not equal to searchView bounds
PiperOrigin-RevId: 530596832
2023-05-09 13:15:20 -04:00
dsn5ft
a93c91a2e2 [Predictive Back][Search] Only use device corner radius if SearchView reaches edge of screen
PiperOrigin-RevId: 524283122
2023-04-17 12:17:13 -07:00
dsn5ft
a4b6f46f0c [Predictive Back][Search] Update SearchView to support predictive back when set up with SearchBar
PiperOrigin-RevId: 520613990
2023-03-30 16:35:21 +00:00
raajkumars
d0b616c56d [M3][SearchBar][SearchView] Updated search bar/view UI to match spec and cleaned up the API.
PiperOrigin-RevId: 492278545
2022-12-01 16:31:36 -05:00
raajkumars
d1bacf55db [M3][SearchBar] Added new SearchBar and SearchView components
PiperOrigin-RevId: 490002827
2022-11-21 13:02:32 -05:00