3008 Commits

Author SHA1 Message Date
conradchen
33e4f841b2 [Catalog][Menu] Fixes context menu are not themed on S
On S, it seems like the framework has a different behavior of applying themes/styles on the decor view theme. Catalog's theme overlay applying logic didn't take care of the implication of the decor view theme, somehow this causes the Material themes are not applied to decor views at all, when a theme overlay is applied.

We've solved the similar issue with the dynamic color implementation. Applies the same fix on catalog to fix this issue.

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

PiperOrigin-RevId: 511254476
2023-02-23 03:45:00 -08:00
pubiqq
fd0c81531c [Chip] Add theme overlays supported on API < 23
Resolves https://github.com/material-components/material-components-android/pull/3245

GIT_ORIGIN_REV_ID=d1cb53cbd4d8ae8ae1fc97d4599c4d2fceea71a8
PiperOrigin-RevId: 511250546
2023-02-22 11:00:58 -08:00
hunterstich
112a0bd20e [Carousel] Restricted MultiBrowseCarouselStrategy's forceCompactArrangement constructor.
This parameter is experimental and planning to be removed in the future.

PiperOrigin-RevId: 510211297
2023-02-17 04:51:36 -08:00
pubiqq
abd1d1c802 [Snackbar] Fix the snackbar position when the anchor view layout listener is enabled
Resolves https://github.com/material-components/material-components-android/pull/3211
Resolves: https://github.com/material-components/material-components-android/issues/3194

GIT_ORIGIN_REV_ID=ef12e5c4f6c6ec49287a472ba1243c20cc2ac979
PiperOrigin-RevId: 509892239
2023-02-17 04:51:00 -08:00
hunterstich
6166e73d36 [Carousel] Implemented smoothScrollToPosition
PiperOrigin-RevId: 509873609
2023-02-17 04:32:27 -08:00
conradchen
0ce6ae458f [ProgressIndicator] Fix linear progress indicator with corner radius
When corner radius of a linear progress indicator is larger than 0, the behavior it's confusing because when the progress fraction is slightly larger than 0, the progress indicator will suddenly show with a width of twice the corner radius.

Fixes this by adjusting the indicator startX and endX correctly so the visible indicator length is always proportional to the progress.

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

PiperOrigin-RevId: 509552399
2023-02-15 10:32:05 -08:00
pubiqq
e06a11982b [Internal] Add compat method to get the screen size
Resolves https://github.com/material-components/material-components-android/pull/3221

GIT_ORIGIN_REV_ID=9323e23689386561d38b0c8c73114e0db7a30557
PiperOrigin-RevId: 509548792
2023-02-15 10:25:53 -08:00
hunterstich
b3f32d42a0 [TopAppBar] Added app:layout_scrollEffect to public attributes.
PiperOrigin-RevId: 509484463
2023-02-15 10:21:30 -08:00
hunterstich
bdf73bf54a [Carousel] Minor javadoc working fixes
PiperOrigin-RevId: 509185650
2023-02-13 13:28:29 +00:00
conradchen
184be8a879 [Build] Internal change
PiperOrigin-RevId: 508758212
2023-02-10 23:33:46 +00: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
795979c283 [Carousel] Fixed MultiBrowseCarouselStrategy method visibility.
PiperOrigin-RevId: 508728594
2023-02-10 22:51:19 +00:00
conradchen
25b3c2b15c [TextField] Fix cutout not working when backgroundTint is set
When backgroundTint is set against the AutoCompleteTextView, since the background drawable of it is a LayerDrawable, which will try to get the constant states of its child drawables and create new drawables from them.

In CutoutDrawable we didn't implement that logic - so the constant state returned will be MaterialShapeDrawableState, and therefore the new drawables created are plain MaterialShapeDrawables, instead of CutoutDrawable.

Fixes this by correctly implement drawable state for CutoutDrawable.

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

PiperOrigin-RevId: 508664043
2023-02-10 16:20:37 +00:00
hunterstich
4b1a890e60 [Carousel] Renamed Maskable.getMaskRect to Maskable.getMaskRectF
PiperOrigin-RevId: 508626230
2023-02-10 14:25:59 +00:00
hunterstich
fc0f53a0cd [Carousel] Renamed CarouselConfiguration to CarouselStrategy.
PiperOrigin-RevId: 508619540
2023-02-10 14:24:39 +00:00
hunterstich
2ca63b92b1 [Carousel] Fixed documentation error
PiperOrigin-RevId: 508451170
2023-02-09 20:55:02 +00:00
rightnao
e9246ed636 [TabLayout] Fix scrolling issue when using scrollable tab layout with viewpager
Resolves https://github.com/material-components/material-components-android/issues/3138

PiperOrigin-RevId: 508444050
2023-02-09 20:53:59 +00:00
Material Design Team
505460feb4 [M3][Color] Internal updates to contrast.
PiperOrigin-RevId: 508410840
2023-02-09 18:28:39 +00:00
hunterstich
85c006b1d2 [Carousel] Updated CarouselConfiguration visibility and improved documentation
PiperOrigin-RevId: 508401214
2023-02-09 18:27:27 +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
67b251af32 [Carousel] Improve documentation and throw when CarouselLayoutManager children are not Maskable.
PiperOrigin-RevId: 508160107
2023-02-09 13:51:34 +00:00
pubiqq
80ec5ccdd5 [AppBarLayout] Add AbsListView to views that support nested scrolling
Resolves https://github.com/material-components/material-components-android/pull/3220

GIT_ORIGIN_REV_ID=14e89d9356190155a82f01414c2221118d8d1d02
PiperOrigin-RevId: 507880939
2023-02-07 22:14:29 +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
pekingme
4f3dc3ed19 [Color] Added new theme attributes for fixed accent colors.
PiperOrigin-RevId: 506910629
2023-02-03 21:02:49 +00:00
hunterstich
1a25706f3a [Carousel] Fixed explore by touch causeing list to scroll
PiperOrigin-RevId: 506701246
2023-02-03 21:01:00 +00:00
dsn5ft
bdb6f5dc47 [CollapsingToolbarLayout] Fix issue with multiline title text flickering when titleCollapseMode=fade
PiperOrigin-RevId: 506622125
2023-02-02 16:51:40 +00:00
hunterstich
26697c3835 [Carousel] Fixed MultiBrowseCarouselConfiguration javadoc
PiperOrigin-RevId: 506597723
2023-02-02 16:51:09 +00:00
rightnao
3c1ac05fac [Badge] Update M3 style to match specs. Alignment tweaks, text appearance change
resolves https://github.com/material-components/material-components-android/issues/3175

PiperOrigin-RevId: 506426087
2023-02-02 16:50:22 +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
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
pfthomas
56f816cc33 [MaterialDatePicker] Fix broken layout when custom description is used
Resolves https://github.com/material-components/material-components-android/issues/3179

PiperOrigin-RevId: 506311285
2023-02-01 15:35:26 +00:00
pekingme
dac9450bfb [Tokens] Introduced new accent color tokens.
PiperOrigin-RevId: 506307041
2023-02-01 15:17:39 +00:00
pekingme
23dc14ca3a [Tokens] Updated to v0.157.
PiperOrigin-RevId: 505978081
2023-01-31 20:01:13 +00:00
hunterstich
0f179b38e9 [Carousel] Add a11y focus scrolling support
PiperOrigin-RevId: 505783943
2023-01-31 19:51:12 +00:00
rightnao
d0d0f54018 [Badge] Add new 'offsetAlignmentMode' attribute that determines where the offset starts for the badge.
PiperOrigin-RevId: 505222416
2023-01-30 16:43:42 +00:00
pfthomas
8656683639 [MaterialButtonToggleGroup][a11y] Update accessibility class name
PiperOrigin-RevId: 504557810
2023-01-26 17:09:27 +00:00
pfthomas
2cef555994 [MaterialDatePicker] Fix NPE
PiperOrigin-RevId: 504263005
2023-01-24 17:03:54 +00:00
dsn5ft
86600c2cf1 [MaterialToolbar] Override inflateMenu() to stop dispatching item changes during inflation for a performance improvement
PiperOrigin-RevId: 503995162
2023-01-24 11:55:47 -05:00
pfthomas
6f0a953c2b [MaterialTimePicker] Fix NPE
PiperOrigin-RevId: 503974850
2023-01-24 11:54:14 -05:00
pekingme
355702f954 [BottomNavigation] Integrated tokens.
Created a new copy of CSL of icon/text/ripple tint for navigation bar. Before this change, they are shared with navigation rail.
Changed item text appearance from textAppearanceTitleSmall to textAppearanceLabelMedium

PiperOrigin-RevId: 503210110
2023-01-24 16:45:31 +00:00
pfthomas
c484ea7da2 [MaterialCalendar] Fix NPE
PiperOrigin-RevId: 502984835
2023-01-19 17:52:32 +00:00
pekingme
4c31ab50aa Automated g4 rollback of changelist 498007913
PiperOrigin-RevId: 502944558
2023-01-19 17:49:56 +00:00
pfthomas
3b99749bc8 [DropdownMenu][a11y] Fix incorrect state
PiperOrigin-RevId: 502659684
2023-01-18 15:26:10 +00:00
pfthomas
7f1def6d3c [MaterialTimePicker] Limit 24h input validation to 23
Resolves https://github.com/material-components/material-components-android/issues/3149

PiperOrigin-RevId: 501869529
2023-01-17 15:14:41 +00:00
pekingme
7f0db1ab15 [RadioButton] Integrated tokens.
Unselected icon color is changed from colorOnSurface to colorOnSurfaceVariant.

PiperOrigin-RevId: 501869216
2023-01-17 15:14:13 +00:00
hunterstich
4ecba81de6 [Carousel] Release carousel component
PiperOrigin-RevId: 501635363
2023-01-12 12:25:52 -08:00
Material Design Team
b892849dc8 [M3][Color] Internal color updates
PiperOrigin-RevId: 501629282
2023-01-12 12:22:52 -08:00
pekingme
bf188c7d2b [IconButton] Integrated tokens.
Icon size is changed from 20dp to 24dp.

PiperOrigin-RevId: 500988634
2023-01-11 22:53:27 +00:00
rightnao
f0053fd3f9 [BottomAppBar] Change Bottom App Bar to place FAB through y translation rather than through margins
Resolves https://github.com/material-components/material-components-android/issues/3097

PiperOrigin-RevId: 500806426
2023-01-11 22:52:59 +00:00