727 Commits

Author SHA1 Message Date
hunterstich
6166e73d36 [Carousel] Implemented smoothScrollToPosition
PiperOrigin-RevId: 509873609
2023-02-17 04:32:27 -08:00
hunterstich
220415d3c1 [Carousel] Fixed scroll offset calculation error when last focal keyline comes after the last child
Calculating end scroll offset was using the distance between the last child and the last focal keyline. When the last child came before the last keyline, an unexpected scroll offset was returned. This also adds a dropdown to the catalog demo to allow setting the number of items in the carousel.

PiperOrigin-RevId: 508739119
2023-02-10 22:52:03 +00:00
hunterstich
fc0f53a0cd [Carousel] Renamed CarouselConfiguration to CarouselStrategy.
PiperOrigin-RevId: 508619540
2023-02-10 14:24:39 +00:00
conradchen
3e6a196832 [Catalog][BottomSheet] Make scrollable content demo behaves consistently in edge-to-edge mode
By default bottom sheets will add paddings at the bottom of its content to account for the navigation bar insets in edge-to-edge mode. However in the case of bottom sheet with a scrollable content, this actually creates inconsistent or at its best confusing behavior - with a plain bottom sheet, the content will be shown behind the navigation bar if you can still scroll down, but with scrollable content, whenever the bottom sheet is fully expanded, the bottom padding shows and cut the scrollable content.

It's debatable which behavior is better. But in our catalog demo I feel we can demonstrate how to do that if clients prefer a less confusing behavior, i.e., only when there's no more content to scroll, the bottom padding shows.

Resolves https://github.com/material-components/material-components-android/issues/3173

PiperOrigin-RevId: 508468196
2023-02-10 14:01:02 +00:00
hunterstich
8014267740 [Carousel] Changed CarouselConfiguration to have an empty constructor and pass Carousel in through onFirstChildMeasuredWithMargins
PiperOrigin-RevId: 508389752
2023-02-09 18:25:29 +00:00
dsn5ft
697d93a854 [Bottom Sheet] Animate bottom sheet position when keyboard is shown using WindowInsetsAnimationCompat API
Note: android:windowSoftInputMode="adjustResize" is required in order for inset animation API to propagate the correct values, otherwise this is a no-op. This change also updates the M3 modal Bottom Sheet themes / theme overlays to use adjustResize by default (can still be overridden by the client).
PiperOrigin-RevId: 508351766
2023-02-09 14:08:51 +00:00
hunterstich
e32e625e14 [Carousel] Updated to support MaterialDivider and helper for getting the bounds of a masked item from the layout manager.
PiperOrigin-RevId: 507612229
2023-02-07 22:11:57 +00:00
Material Design Team
0dd220a6e9 [M3][Carousel] Updated assets for Carousel demo
PiperOrigin-RevId: 507501256
2023-02-06 17:33:01 +00:00
dsn5ft
2e7979b60b [Catalog][TopAppBar] Fix flickering color fill in preferences demo
Set the AppBarLayout's app:liftOnScrollTargetViewId to the Preferences RecyclerView so the AppBarLayout knows which exact view is scrolling

Resolves https://github.com/material-components/material-components-android/issues/3214

PiperOrigin-RevId: 506971393
2023-02-03 21:03:44 +00:00
hunterstich
ff48bc5e3b [Carousel] Removed CenteredCarouselConfiguration.
This removes CenteredCarouselConfigration and its superclass MultibrowseCarouselConfiguration and renames StartCarouselConfiguration to MultiBrowseCarouselConfiguration.

PiperOrigin-RevId: 506424085
2023-02-01 22:32:20 +00:00
afohrman
8c2b511ad1 [Adaptive][Side Sheet] Modularized side sheet demo.
PiperOrigin-RevId: 502905537
2023-01-19 17:44:50 +00:00
pfthomas
4bd5e619fb [Catalog][Card] Fix CardSelectionModeActivity sample
Resolves https://github.com/material-components/material-components-android/issues/2716
Resolves https://github.com/material-components/material-components-android/pull/2717

PiperOrigin-RevId: 502659028
2023-01-18 15:24:59 +00:00
hunterstich
4ecba81de6 [Carousel] Release carousel component
PiperOrigin-RevId: 501635363
2023-01-12 12:25:52 -08:00
manabu-nakamura
ee00523b63 [Catalog] Applied edge-to-edge to modal side sheet
Resolves https://github.com/material-components/material-components-android/pull/3134

GIT_ORIGIN_REV_ID=8e6913689cfd8155f03b308f3e8f2e4ffb5d7261
PiperOrigin-RevId: 500759266
2023-01-10 13:39:03 -05:00
afohrman
e92414c460 [Adaptive][Side Sheet] Disabled lift on scroll in Side Sheet demo.
PiperOrigin-RevId: 499915843
2023-01-05 13:00:49 -05:00
pekingme
08595de396 [Adaptive] Changed the nav drawer's width from 232dp to wrap_content.
PiperOrigin-RevId: 499483294
2023-01-05 12:55:58 -05:00
manabu-nakamura
68688e9d61 [Switch] Use MaterialSwitch instead of SwitchCompat in Catalog.
Resolves https://github.com/material-components/material-components-android/pull/3154

GIT_ORIGIN_REV_ID=91e38eea6378a0f3a76e4db6118f0cae10042797
PiperOrigin-RevId: 498385616
2022-12-29 13:18:06 -05: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
afohrman
27529582c7 [Adaptive][Side Sheet] Added explicit style definition to coplanar sheet catalog demo.
The coplanar sheet catalog demo was missing an explicit style definition, which was causing some attributes like the background to display improperly.

PiperOrigin-RevId: 494217653
2022-12-09 14:55:29 -05:00
afohrman
7096161776 [Adaptive][Side Sheet] Updated close sheet button content description in catalog.
PiperOrigin-RevId: 494211768
2022-12-09 14:53:52 -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
pubiqq
86fc5faaec [Catalog][DatePicker] Fix incorrect time stamps
Resolves https://github.com/material-components/material-components-android/pull/3132

GIT_ORIGIN_REV_ID=c918a0dc107d164bdc486788f5def004c5bdeb77
PiperOrigin-RevId: 493921722
2022-12-08 19:49:21 +00:00
afohrman
1081537fb6 [Adaptive][Side Sheet] Release Side Sheet catalog demo.
PiperOrigin-RevId: 493764000
2022-12-08 02:37:21 +00:00
afohrman
f0a05381f4 [Adaptive] [Side Sheet] Rebrand "Adaptive Sheets" demo to "Side Sheet".
PiperOrigin-RevId: 493759533
2022-12-08 02:36:28 +00:00
raajkumars
30cc7ce847 [Catalog] Updated search demo to change search bar hint
PiperOrigin-RevId: 493643024
2022-12-07 14:50:05 -05:00
raajkumars
4bff2735b7 [Catalog] Updated Catalog demo to change search bar/view demo title.
PiperOrigin-RevId: 492298010
2022-12-02 15:12:20 +00:00
manabu-nakamura
695fb4abb5 [Catalog] Applied edge-to-edge to preferences bottom sheet
Resolves https://github.com/material-components/material-components-android/pull/3123
Resolves https://github.com/material-components/material-components-android/issues/3122

GIT_ORIGIN_REV_ID=fd094876551f8106c5cc57c46f2b3c6ffa3a7113
PiperOrigin-RevId: 492262956
2022-12-01 16:23:04 -05:00
raajkumars
030fe32445 [Catalog] Added Search Demo .
PiperOrigin-RevId: 490241875
2022-11-22 12:31:27 -05:00
hunterstich
45a569f858 [Catalog] Add themed icon
PiperOrigin-RevId: 486702225
2022-11-09 22:13:56 +00:00
pfthomas
2f9844b34a [MaterialDatePicker][a11y] Announce start/end dates
PiperOrigin-RevId: 481152229
2022-10-17 20:00:14 +00:00
Blue
e8bfad5644 [MaterialButtonToggleGroup] handle setEnable childs
Resolves https://github.com/material-components/material-components-android/pull/2974
Resolves https://github.com/material-components/material-components-android/issues/2962
Resolves https://github.com/material-components/material-components-android/issues/1813

GIT_ORIGIN_REV_ID=e8f6b7cb1ca143f0ed1e2ec8d501164568dac2d9
PiperOrigin-RevId: 479403809
2022-10-11 14:00:17 +00:00
pfthomas
be8b8d44de [MaterialDatePicker][a11y] Announce selection
PiperOrigin-RevId: 478026835
2022-10-03 19:13:28 +00:00
pekingme
4c11606122 [Catalog][BottomAppBar] Added the handle to the bottom sheet.
Resolves https://github.com/material-components/material-components-android/pull/2970

PiperOrigin-RevId: 475878478
2022-09-22 17:37:28 +00:00
pfthomas
7bc5689789 [MaterialDatePicker] Add method to specify a content description to decorated views
PiperOrigin-RevId: 474622363
2022-09-16 13:56:02 -04:00
pubiqq
09f1ee5644 [Catalog][TimePicker] Add input mode selector
Resolves https://github.com/material-components/material-components-android/pull/2902

GIT_ORIGIN_REV_ID=3d62554886116fba051d8030a731678f3d181d30
Co-authored-by: paulfthomas
PiperOrigin-RevId: 474614468
2022-09-16 13:53:10 -04:00
pfthomas
ceacaa699a [BottomAppBar][Catalog][a11y] Improve focus handling
PiperOrigin-RevId: 471932710
2022-09-08 10:18:28 -04:00
pfthomas
54b0d7d480 Automated g4 rollback of changelist 470727992
PiperOrigin-RevId: 471050462
2022-08-31 15:54:17 -07:00
KyungEun No
5c2eb45fd9 [Catalog] Fix navigation bar overlaps ui #2927
Resolves https://github.com/material-components/material-components-android/pull/2930

GIT_ORIGIN_REV_ID=643e5139f53d49d4b5fb1c6d85146400aa10be24
PiperOrigin-RevId: 470795174
2022-08-30 11:26:49 -04:00
pfthomas
968e035e83 [BottomAppBar][Catalog][a11y] Request focus on search menu when showing
PiperOrigin-RevId: 470727992
2022-08-29 10:40:55 -07:00
dsn5ft
be650c4f57 [MaterialDatePicker] Add initialize() method to DayViewDecorator to better support configuration changes
Fixes an issue where compound drawables using resource qualifiers like -land will have the wrong value on rotation

PiperOrigin-RevId: 466776776
2022-08-11 12:52:12 -04:00
conradchen
3d32f73f4d [Catalog] Replace android.support dependencies with androidx
Resolves https://github.com/material-components/material-components-android/pull/2898

PiperOrigin-RevId: 466061753
2022-08-08 12:23:55 -04:00
dsn5ft
c19efa03e5 [Catalog] Update date picker demo text appearances to M3
PiperOrigin-RevId: 466034718
2022-08-08 11:19:56 -04:00
raajkumars
2697e0f699 [Catalog]Updated button demo to provide the correct content description for icon only buttons.
PiperOrigin-RevId: 466034708
2022-08-08 11:08:01 -04:00
afohrman
549fe19134 [Catalog] Added search/filter functionality to MDC Catalog.
This speeds up our development process and enhances the user experience of our catalog.

Also added a bottom line to the last row of boxes in the table of contents grid in order to avoid this visual breakage when the grid does not fill up the screen: screenm/9V8HPkufqM9BkVc.png. Previously, GridDividerDecoration avoided drawing the bottom line of the grid in the last row of the grid, but now that there can be less boxes than the screen size it's important to handle that case.

PiperOrigin-RevId: 465643774
2022-08-08 11:03:52 -04:00
leticiars
8f149b10dc [Checkbox] Added indeterminate state support to the checkbox.
A MaterialCheckBox can now be checked, unchecked, or indeterminate.

Resolves https://github.com/material-components/material-components-android/issues/857

PiperOrigin-RevId: 465598224
2022-08-08 10:58:39 -04:00
dsn5ft
debe22e397 [MaterialDatePicker] Refactor header styling to allow for multiline title with description text
PiperOrigin-RevId: 465538100
2022-08-05 20:02:57 +00:00
pubiqq
745acfdfc7 [Catalog] Fix the favorite icon vertical alignment on demo landing rows
Resolves https://github.com/material-components/material-components-android/pull/2850

GIT_ORIGIN_REV_ID=9b5bfc62a33073e3e13ebd13586fea933f92299f
PiperOrigin-RevId: 465403035
2022-08-05 19:56:56 +00:00
rightnao
8bec1675e6 [BottomAppBar] Updating catalog to remove M2 options
PiperOrigin-RevId: 465353345
2022-08-04 14:50:02 -04:00