36 Commits

Author SHA1 Message Date
pekingme
8204856dd4 [Token][Color] Upgraded to v0.170 for tonal surface colors.
PiperOrigin-RevId: 555230534
2023-08-09 19:03:25 +00:00
pekingme
720998dcbd [SearchBar] Enforced outline variant to use colorSurface as container color.
PiperOrigin-RevId: 553337995
2023-08-04 01:03:50 +00:00
raajkumars
4e5166f2b7 Automated g4 rollback of changelist 546349642
PiperOrigin-RevId: 551552652
2023-07-27 22:51:06 +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
rightnao
e3b255b3a0 [Docs] Crosslink github docs in javadocs
PiperOrigin-RevId: 546393704
2023-07-11 19:37:37 +00:00
raajkumars
c15a323140 [SearchBar] Added support to set a default content description if a content description is not set explicitly.
PiperOrigin-RevId: 546349642
2023-07-11 19:35:33 +00:00
afohrman
f2e70d2d66 [Android U] Replaced BuildCompat#isAtLeastU() method calls with explicit SDK checks for UPSIDE_DOWN_CAKE.
Before 1.12.0-alpha01 which was released on 6/7, BuildCompat#isAtLeastU() only returns true if API level is greater than 33 and the version running is a pre-release. Two things happened on 6/7 -- the version became a "platform stable" version, and core library version 1.12.0-alpha01 was released, which changes BuildCompat#isAtLeastU() to return true if the version is 34 and stable.

PiperOrigin-RevId: 540304068
2023-06-14 12:45:51 -07: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
Material Design Team
884a4541e2 [Search] Support stylus handwriting in SearchBar
PiperOrigin-RevId: 524098693
2023-04-17 12:16:03 -07:00
raajkumars
3029ff0fc4 Automated g4 rollback of changelist 523789226
PiperOrigin-RevId: 524046939
2023-04-17 12:12:17 -07:00
raajkumars
9ffaa8d1bf [M3][Search] Updated search styles to set the default style attributes in the related theme overlay.
PiperOrigin-RevId: 523789226
2023-04-13 09:05:53 -07:00
dsn5ft
176ce5e5f0 [Predictive Back][Search] Add ability to opt-out of back handling
PiperOrigin-RevId: 522626762
2023-04-10 15:06:53 +00:00
raajkumars
203d5ec3a3 [M3][Search] Improve performance by preventing item change notifications during inflation.
PiperOrigin-RevId: 522612855
2023-04-10 15:05:58 +00:00
pekingme
cf006c5e10 [Search] Made SearchBar and SearchView's container colors configurable in XML style.
PiperOrigin-RevId: 522468493
2023-04-10 15:03:01 +00:00
dsn5ft
5a37e4b35f [Gradle] Update to AGP 7.4.2 to get latest lint and fix Android U lint issues
PiperOrigin-RevId: 520691813
2023-03-30 18:15:24 +00: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
11599231a9 [M3][Search] Fixed a crash in search components when view attributes inspection dev setting is turned on.
PiperOrigin-RevId: 520131513
2023-03-29 19:05:42 +00:00
raajkumars
cdda1fc66e [Search] Added support to pass toolbar style.
PiperOrigin-RevId: 519876161
2023-03-28 16:18:25 +00:00
pekingme
9f1caa2c64 [Tokens] Upgraded to v0.162.
PiperOrigin-RevId: 517446114
2023-03-20 21:23:07 +00:00
pubiqq
e2636ff33d [Search] Fix expand/collapse animation for large screen devices
Resolves https://github.com/material-components/material-components-android/pull/3198

GIT_ORIGIN_REV_ID=717d2bf381259822d0aff9b7d40d16579d362b21
PiperOrigin-RevId: 506324275
2023-02-01 22:31:41 +00:00
pekingme
23dc14ca3a [Tokens] Updated to v0.157.
PiperOrigin-RevId: 505978081
2023-01-31 20:01:13 +00:00
raajkumars
e2c8cbadb8 [M3][SearchBar] Fixed issue that caused the wrong component to be focused on automatically when talkback is active.
PiperOrigin-RevId: 493910945
2022-12-08 19:47:30 +00:00
pekingme
2019bf90be [Tokens] Upgraded to version v0.147.
PiperOrigin-RevId: 492551875
2022-12-02 18:34:12 -05:00
dsn5ft
a241ee90ab [SearchView] Refactored status bar spacer edge-to-edge detection to work based on insets
This fixes the detection when using WindowCompat.setDecorFitsSystemWindows, and we shouldn't need to be checking specific edge-to-edge flags anymore

PiperOrigin-RevId: 492309763
2022-12-02 15:59:39 +00:00
pekingme
17e3581642 [Tokens] Upgraded to v0.145
PiperOrigin-RevId: 492291163
2022-12-02 15:11:37 +00:00
pekingme
b9963a5212 [Tokens][Android] Omitted more comments when configuration specifies no comments.
PiperOrigin-RevId: 492290497
2022-12-02 15:04:22 +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
dc2e973046 [M3][SearchBar][SearchView] Updated style to match updated M3 spec.
PiperOrigin-RevId: 491980034
2022-11-30 17:32:26 -05:00
pekingme
8ee6c00f73 [Tokens] Upgraded to v0.142
Added lStar CSLs for new neutral palettes in v31 and above.

PiperOrigin-RevId: 491693724
2022-11-30 17:31:11 -05:00
pekingme
12ef329276 [Tokens] Upgraded to v0.141
PiperOrigin-RevId: 490324728
2022-11-23 15:13:20 -05:00
pekingme
b2b546b205 [Tokens] Internal updates.
PiperOrigin-RevId: 490295053
2022-11-23 15:11:19 -05:00
raajkumars
978ffdf0aa [M3][SearchBar][SearchView] Renamed search style attributes to add "material" prefix.
PiperOrigin-RevId: 490260853
2022-11-22 12:36:54 -05:00
raajkumars
d1bacf55db [M3][SearchBar] Added new SearchBar and SearchView components
PiperOrigin-RevId: 490002827
2022-11-21 13:02:32 -05:00