2958 Commits

Author SHA1 Message Date
pekingme
f8eca49c9c [Dialog] Integrated tokens.
PiperOrigin-RevId: 500718931
2023-01-10 02:44:42 -05:00
hunterstich
a4107b9072 Automated g4 rollback of changelist 499286690
PiperOrigin-RevId: 499947079
2023-01-10 02:42:19 -05:00
afohrman
8e12e31c9a [Adaptive][Side Sheet] Renamed references to "outwards" to "outer".
"Outer" is clearer than "outwards".

PiperOrigin-RevId: 499904971
2023-01-05 12:59:26 -05:00
afohrman
e88e341699 [Adaptive][Side Sheet] Renamed private calculateSlideOffsetBasedOnOutwardEdge method to calculateSlideOffset in SheetDelegate and RightSheetDelegate.
The slide offset isn't actually based on the outer edge; changing the outer edge wouldn't change the slide offset calculation.

PiperOrigin-RevId: 499877224
2023-01-05 12:58:03 -05:00
afohrman
3b61327513 [Adaptive][Side Sheet] Added accessibilityPaneTitle to side sheet.
This adds an accessibilityPaneTitle that is spoken by TalkBack on API levels 19 and later.

In order to trigger the accessibilityPaneTitle event, it was necessary to add a visibility change when the sheet is expanded and hidden. The sheet now is INVISIBLE at STATE_HIDDEN and VISIBLE at all other states.

Also removed the code to switch focus to the sheet on expansion in favor of this approach to align with TalkBack's APIs.

PiperOrigin-RevId: 499604691
2023-01-05 12:57:15 -05:00
pekingme
8c8db7e874 [NavigationView] Integrated tokens.
Changed the width from 280dp to 360dp

PiperOrigin-RevId: 499479992
2023-01-05 12:51:35 -05:00
hunterstich
acfd97f7ac [NavigationBar][NavigationRail] Expose getMenuView
PiperOrigin-RevId: 499286690
2023-01-05 12:50:15 -05:00
pfthomas
cd5246f49e [MaterialDatePicker][a11y] Improve date input validation feedback follow up
PiperOrigin-RevId: 498167309
2022-12-29 00:21:20 -05:00
Material Design Team
0200690256 Automated g4 rollback of changelist 497863181
PiperOrigin-RevId: 498007913
2022-12-29 00:20:39 -05:00
pekingme
44445fa90a [AppBar] Integrated tokens.
PiperOrigin-RevId: 497863181
2022-12-29 00:19:54 -05:00
pfthomas
e1688f3d19 [MaterialDatePicker][a11y] Improve date input validation feedback
Resolves https://github.com/material-components/material-components-android/issues/2223

Add `TextInputLayout.setErrorAccessibilityLiveRegion` and `TextInputLayout.getErrorAccessibilityLiveRegion` to allow controlling the way the TextInputLayout error is announced.

Example:

```
textInputLayout.setErrorAccessibilityLiveRegion(ViewCompat.ACCESSIBILITY_LIVE_REGION_NONE);
```

PiperOrigin-RevId: 497323465
2022-12-29 00:19:00 -05:00
pfthomas
09f26073ae [MaterialDatePicker] Fix headerTitle text size
PiperOrigin-RevId: 497183320
2022-12-22 23:48:23 +00:00
pekingme
e7d757a5da [SideSheet] Integrated tokens.
PiperOrigin-RevId: 497126105
2022-12-22 23:47:09 +00:00
pfthomas
11c1df9c8f [MaterialDatePicker] Unhide setFirstDayOfWeek
Resolves https://github.com/material-components/material-components-android/issues/1949

PiperOrigin-RevId: 496865765
2022-12-21 21:14:25 +00:00
Material Design Team
e7e9747c28 [M3][Color] Internal Color changes.
PiperOrigin-RevId: 495968907
2022-12-19 23:00:52 +00:00
Material Design Team
93f8ffb46a [Slider] Add mouse support for slider control.
This change makes it so that mouse input does not behave exactly like touch when using a slider. Previously, any time a touch event was detected on a slider bar, we would postpone updating the slider position because there was potential for a pan drag if the container was a scrollable view. See cl/286431744. However for mouse input this should never apply because a mouse down event should not be able to scroll the container.

This change also fixes the halo not updating when clicking or touching down on the slider (without dragging). This isn't very noticeable when only using touch input but when hovering over the control with a mouse, you can see the halo was in the last position of the slider instead of the current position.

PiperOrigin-RevId: 495905645
2022-12-19 22:59:24 +00:00
afohrman
af16b051af [Adaptive][Side Sheet] Removed unused methods in SheetDialog and SideSheetDialog.
Also remove the redundant call to supportRequestWindowFeature in SideSheetDialog's constructor.

PiperOrigin-RevId: 495715894
2022-12-16 00:58:14 +00:00
afohrman
ad3cf5ad6b [Adaptive][Side Sheet] Add detached variant of modal side sheet.
PiperOrigin-RevId: 495709828
2022-12-16 00:57:15 +00:00
afohrman
938105a93b [Adaptive] [Side Sheet] Added detached variants of standard and coplanar sheets.
Added logic for an innerMargin to SideSheetBehavior and delegates and incorporated innerMargin into the sheet offset calculations to account for the extra spacing and avoid a jump when dragging the sheet to STATE_EXPANDED.

Also added a colored background to the catalog demo in order to see the corners of the sheet.

PiperOrigin-RevId: 495701453
2022-12-16 00:56:31 +00:00
afohrman
2fd2d66b43 [Adaptive][Side Sheet] Fixed issue where sheet would jump to the far edge of the screen in RTL without temporary fix.
PiperOrigin-RevId: 495687169
2022-12-16 00:55:39 +00:00
pfthomas
d4c16e8486 [MaterialDatePicker] Capitalize standalone date
PiperOrigin-RevId: 495627493
2022-12-16 00:54:55 +00:00
Material Design Team
169bbca57b [M3][Color] Added support for missing color roles.
PiperOrigin-RevId: 495423456
2022-12-16 00:52:58 +00:00
pubiqq
2465192173 [TabLayout] Fix confusing documentation
Resolves https://github.com/material-components/material-components-android/pull/3098

GIT_ORIGIN_REV_ID=200a9d2f97bffa86a2b8ee3c3746fc7b5718b7a5
PiperOrigin-RevId: 495029269
2022-12-13 13:37:50 -05:00
Material Design Team
1825b04d3c [M3][Color] Updated content color implementation.
PiperOrigin-RevId: 494823736
2022-12-13 13:36:56 -05:00
dsn5ft
87ce239b01 [Docs] Remove smart characters from doc comments
PiperOrigin-RevId: 494733732
2022-12-12 16:40:01 -05:00
Material Design Team
bd89d8373f [M3][Color] Internal Changes
PiperOrigin-RevId: 494176344
2022-12-09 14:52:11 -05:00
afohrman
bc61d6db62 [Adaptive][Side Sheet] Added coplanar side sheet with APIs for setting a coplanar sibling view.
PiperOrigin-RevId: 493959543
2022-12-08 20:03:52 +00:00
afohrman
48a3a758fa [Adaptive][Side Sheet] Set accessibility focus to the side sheet when expanded.
PiperOrigin-RevId: 493938007
2022-12-08 19:51:47 +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
dsn5ft
401527f9e7 [Side Sheet] Fix vertically scrolling sheet swipe issue by deleting most of the nested scrolling code
We shouldn't need nested scrolling in side sheet because the scroll and swipe directions are different, and horizontal nested scrolling doesn't seem supported

PiperOrigin-RevId: 493756832
2022-12-08 02:17:10 +00:00
leticiars
484281f119 [Slider] Fixed label breaking near edge.
Resolves https://github.com/material-components/material-components-android/issues/2942

PiperOrigin-RevId: 493720562
2022-12-08 02:16:37 +00:00
afohrman
d481dddefd [Adaptive] [Side Sheet] Cancel modal side sheet scrim on STATE_HIDDEN.
PiperOrigin-RevId: 493655992
2022-12-07 14:51:53 -05:00
afohrman
c64f57224b [Adaptive] [Side Sheet] Restrict SheetDialog methods from the public API surface and rename getDismissWithAnimation.
PiperOrigin-RevId: 493644328
2022-12-07 14:51:08 -05:00
afohrman
2468d6cae6 [Adaptive] [Side Sheets] Add SideSheetCallback listener to SideSheetBehavior to track @SheetState state change events.
Includes a fix for a really strange issue where setting the background color from the callback worked, but if setText was called, it would cause the sheet to flash off the screen when STATE_EXPANDED was reached.

PiperOrigin-RevId: 493409073
2022-12-07 14:48:36 -05:00
pfthomas
bb3ea6e8bb [MaterialDatePicker] Update text appearances
PiperOrigin-RevId: 493280301
2022-12-06 15:24:24 -05:00
leticiars
997feacfd8 Automated g4 rollback of changelist 493122430
PiperOrigin-RevId: 493140204
2022-12-06 15:23:48 -05:00
pubiqq
139600418b [TabLayout] Fix confusing documentation
Resolves https://github.com/material-components/material-components-android/pull/3098

GIT_ORIGIN_REV_ID=200a9d2f97bffa86a2b8ee3c3746fc7b5718b7a5
PiperOrigin-RevId: 493122430
2022-12-06 15:23:12 -05:00
rightnao
dfb9e81eeb [Motion] Motion tweaks
PiperOrigin-RevId: 493105642
2022-12-06 15:22:34 -05:00
afohrman
2ab5430fed [Adaptive] [Side Sheet] Renamed SheetEdge#RIGHT to SheetEdge#EDGE_RIGHT.
PiperOrigin-RevId: 493093973
2022-12-06 15:21:53 -05:00
pekingme
14fa66a2a9 [TimePicker] Integrated M3 tokens.
PiperOrigin-RevId: 493059854
2022-12-05 15:13:23 -05:00
Material Design Team
ce68ec6193 [M3][Color] Added framework color roles support for content color
PiperOrigin-RevId: 493027582
2022-12-05 15:12:27 -05:00
rightnao
319467123f [TabLayout] Fix bug with setScrollPosition not updating indicator due to onLayout call drawing the indicator below the selected tab.
Resolves https://github.com/material-components/material-components-android/issues/3101

PiperOrigin-RevId: 492562100
2022-12-02 18:38:40 -05:00
pekingme
0f0b93c0b1 [Snackbar] Integrated tokens.
PiperOrigin-RevId: 492560860
2022-12-02 18:37:32 -05:00
minwang1
7bbbe3925e [Slider] Added API for setting the radius of active/inactive tick in xml and Java.
Resolves https://github.com/material-components/material-components-android/pull/2994
Resolves https://github.com/material-components/material-components-android/issues/1920

GIT_ORIGIN_REV_ID=7bf15fb545496cb8e63f8b6ecf653229b1f203f8
PiperOrigin-RevId: 492557754
2022-12-02 18:36:26 -05:00
pekingme
40c8b5c9c6 [Menu] Integrated tokens.
PiperOrigin-RevId: 492552660
2022-12-02 18:35:26 -05:00
pekingme
2019bf90be [Tokens] Upgraded to version v0.147.
PiperOrigin-RevId: 492551875
2022-12-02 18:34:12 -05:00
afohrman
0f9c6fcab8 [Adaptive] [Side Sheet] Made SheetDialog abstract base class and Sheet interface package-private.
PiperOrigin-RevId: 492534084
2022-12-02 18:33:21 -05:00
Material Design Team
94c73cc3af [M3][Color] Internal changes
PiperOrigin-RevId: 492454046
2022-12-02 16:02:11 +00:00
pekingme
989d574dbb [Color] Added tonal surface color theme attributes and updated themes.
PiperOrigin-RevId: 492316991
2022-12-02 16:01:22 +00: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