2717 Commits

Author SHA1 Message Date
raajkumars
f3d422fb99 [Internal] Moved FadeThroughDrawable to Material Android Library.
PiperOrigin-RevId: 461932441
2022-07-19 18:43:37 +00:00
raajkumars
c8878f1790 [Internal] Move ClippableRoundedCornerLayout to Material Android library.
PiperOrigin-RevId: 461898783
2022-07-19 18:43:09 +00:00
conradchen
ef8e9aa895 [BottomSheet] Handle half-expanded state when drag handle clicked
PiperOrigin-RevId: 461674745
2022-07-19 18:42:21 +00:00
leticiars
6eeb95f971 [Divider] Fixed lastItemDecorated not being applied to horizontal orientation. Also updated the demo to include both orientations.
Resolves https://github.com/material-components/material-components-android/issues/2802

PiperOrigin-RevId: 461247080
2022-07-19 18:40:54 +00:00
pfthomas
777ba0d55a [Chip] Fix API requirement
PiperOrigin-RevId: 461030541
2022-07-14 19:59:14 +00:00
Manuel Mato
34ac0ecf72 Automated g4 rollback of changelist 458265064
PiperOrigin-RevId: 461012017
2022-07-14 18:41:16 +00:00
conradchen
e968929c08 [Switch] Update to AppCompat 1.5.0-beta01 and remove workarounds (also update compileSdkVersion/targetSdkVersion to 32)
PiperOrigin-RevId: 460970462
2022-07-14 18:18:56 +00:00
pubiqq
b18f45ee99 [TextInputLayout] Delete unused paint
Resolves https://github.com/material-components/material-components-android/pull/2812

    GIT_ORIGIN_REV_ID=b1c718c45ab55d0c70539afe6233d10e883c413a
    Co-authored-by: paulfthomas

PiperOrigin-RevId: 460962180
2022-07-14 18:17:02 +00:00
conradchen
d1895cdd35 [Tab] Mutate selected indicator drawable when it's being set
Wrapping and mutating a given drawable which is supposed to be tinted is a standard practice across the Material library. This CL applies the same logic to Tab's selected indicator drawables and also refactoring the relevant logic a bit to make it cleaner.

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

PiperOrigin-RevId: 460765659
2022-07-13 19:53:29 +00:00
rightnao
53b3001396 [BottomAppBar] Changing default Material3 theme to follow M3 specs
PiperOrigin-RevId: 459785651
2022-07-08 13:32:47 -07:00
pfthomas
9b1a74b95e [ChipGroup][a11y] Fix announced Chip count and index
PiperOrigin-RevId: 459759081
2022-07-08 13:27:42 -07:00
conradchen
10ac255bb2 Automated g4 rollback of changelist 457744460
PiperOrigin-RevId: 459744654
2022-07-08 13:27:04 -07:00
pekingme
2719859ec8 [Tokens][exFAB] Integrate component tokens.
PiperOrigin-RevId: 459541412
2022-07-07 12:31:46 -07:00
pfthomas
be8e4e2d9a [MaterialDatePicker] Improve error formatting
PiperOrigin-RevId: 459495629
2022-07-07 12:30:40 -07:00
pubiqq
74b7706de9 [ShapeableImageView] Don't change layer type when view is detached from the window
When the exit transition starts, the layer type is set to LAYER_TYPE_NONE (inside onDetachedFromWindow). In this case, clearPaint (Paint with Xfermode = PorterDuff.Mode.DST_OUT) stops working correctly.
The patch just deletes the layer type setup from onDetachedFromWindow, leaving the layer type set to LAYER_TYPE_HARDWARE.

Resolves https://github.com/material-components/material-components-android/issues/2703
Resolves https://github.com/material-components/material-components-android/pull/2792

GIT_ORIGIN_REV_ID=b05230b40529251b8b16cc02f1cfd64f3801c1d8
PiperOrigin-RevId: 459308833
2022-07-06 13:15:46 -07:00
pubiqq
0c56a45639 [MaterialTimePicker] Refine AM/PM toggle logic
Resolves https://github.com/material-components/material-components-android/pull/2803

GIT_ORIGIN_REV_ID=f5b301b86b8a91189b8199f924b8f837bd7d3fcd
PiperOrigin-RevId: 459256240
2022-07-06 13:08:18 -07:00
pubiqq
15fa4db616 [TextInputLayout] Fix "android:enabled" attribute support
Resolves https://github.com/material-components/material-components-android/issues/2766
Resolves https://github.com/material-components/material-components-android/pull/2769

GIT_ORIGIN_REV_ID=9e60355679855b57ab63edf63944d3e23d2aec9a
PiperOrigin-RevId: 458516880
2022-07-06 05:03:16 -07:00
Material Design Team
c49f9615a8 Automated g4 rollback of changelist 458476376
PiperOrigin-RevId: 458490930
2022-07-06 05:02:20 -07:00
raajkumars
2d83321a91 [Icon Buttons] Added support for toggleable Icon buttons.
PiperOrigin-RevId: 458476376
2022-07-06 05:00:00 -07:00
pekingme
5ff3930833 [FAB][Cleanup] Reorder styles.
PiperOrigin-RevId: 458305149
2022-07-06 04:57:47 -07:00
pekingme
04f4a1abc0 [ProgressIndicator] Renamed res/animator to res/anim.
PiperOrigin-RevId: 458269849
2022-07-06 04:56:28 -07:00
Manuel Mato
03c4353937 [MaterialDividerItemDecoration] When lastItemDecorated false then creates a blink with the last view contains a dropdown from visible to gone
Resolves https://github.com/material-components/material-components-android/issues/2771
Resolves https://github.com/material-components/material-components-android/pull/2782

GIT_ORIGIN_REV_ID=8f60bab8cbdcfd1db3b7ced1a508d0ac0cde0197
PiperOrigin-RevId: 458265064
2022-07-06 04:55:00 -07:00
pekingme
65a3ac555a Automated g4 rollback of changelist 457648699
PiperOrigin-RevId: 458256849
2022-07-06 04:53:45 -07:00
pubiqq
4dc3d93ac2 [NavigationView] Update foreground boundaries of menu items when setting a new foreground
Resolves https://github.com/material-components/material-components-android/pull/2737
Resolves https://github.com/material-components/material-components-android/issues/2735

GIT_ORIGIN_REV_ID=8632d22d414f592378b68a8d27f7fba73edc28f9
PiperOrigin-RevId: 458198734
2022-07-06 04:52:55 -07:00
pubiqq
1dc0e6b490 [MaterialTimePicker] Fix AM/PM toggle
Before the CL we set AM/PM selection in the listeners no matter the target view (AM/PM) is being checked or being unchecked. So the order of calling listeners of AM and PM can "revert" the selection, if the callback for being unchecked is called later.

This logic is apparently wrong - we should select AM/PM when they are being unchecked anyways.

Resolves https://github.com/material-components/material-components-android/pull/2791
Resolves https://github.com/material-components/material-components-android/issues/2788

GIT_ORIGIN_REV_ID=018e053394f44d6334827fc3f95406c2937ae582
PiperOrigin-RevId: 458027987
2022-07-06 04:51:59 -07:00
AshutoshSundresh
cd80b71817 [Resources] Remove unused public.xml resources
Resolves https://github.com/material-components/material-components-android/pull/2761

GIT_ORIGIN_REV_ID=fbc80605591c097ab56f4a8f0c9b4a2a3cbcfe10
PiperOrigin-RevId: 457959343
2022-06-29 14:39:28 +00:00
conradchen
ac7b761294 [BottomSheet] Create a drag handle view which support accessibility control
PiperOrigin-RevId: 457939228
2022-06-29 14:38:43 +00:00
conradchen
ca2da6c6a4 Automated g4 rollback of changelist 454163860
PiperOrigin-RevId: 457744460
2022-06-29 14:36:58 +00:00
Material Design Team
7e9045b8b7 Automated g4 rollback of changelist 457576897
PiperOrigin-RevId: 457648699
2022-06-29 13:40:35 +00:00
pekingme
ac5c4df3ae [Tokens][FAB] Integrate component tokens.
PiperOrigin-RevId: 457576897
2022-06-27 23:30:10 +00:00
rightnao
f2f588af82 [BottomAppBar] Token integration
PiperOrigin-RevId: 457554326
2022-06-27 17:26:37 -04:00
pekingme
cc317e15d7 [Tokens] Included parent display group names in the output file comments.
PiperOrigin-RevId: 457503467
2022-06-27 17:25:31 -04:00
conradchen
36efca0aa2 [Tab] Refine tab update logic from ViewPager adapters
Refines the logic so only the affected tabs will be updated.

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

PiperOrigin-RevId: 457501629
2022-06-27 20:09:36 +00:00
rightnao
f2423de558 [BottomAppBar] Add attribute to remove embedded FAB elevation
PiperOrigin-RevId: 457084450
2022-06-27 20:08:08 +00:00
pekingme
cd37b9170c [Tokens] Updated formatter to add an new line between token_set sections for better readability.
PiperOrigin-RevId: 457063206
2022-06-24 20:25:49 +00:00
rightnao
88a73ebb8e [BottomAppBar] Add fab end margin attribute
PiperOrigin-RevId: 456907281
2022-06-24 20:25:00 +00:00
rightnao
397e48f279 [BottomAppBar] Add menu alignment attribute
PiperOrigin-RevId: 456848323
2022-06-24 20:23:47 +00:00
pekingme
d320d4866b [Tokens] Integrated elevation overlay color.
PiperOrigin-RevId: 456827685
2022-06-24 20:22:35 +00:00
pekingme
4188995b11 [Tokens][BottomAppBar] Generated resources from tokens.
PiperOrigin-RevId: 456827093
2022-06-24 20:20:47 +00:00
pekingme
2fc2e6a167 [Tab] Fixed indicator not updating when a tab to the start/left of the selected tab is removed.
PiperOrigin-RevId: 456322731
2022-06-23 18:34:24 +00:00
rightnao
cab45dd1df [BottomAppBar] Add new anchor mode attribute for FAB that has an embedded option
PiperOrigin-RevId: 455660518
2022-06-23 18:33:35 +00:00
dsn5ft
241aa5cd8b [CollapsingToolbarLayout] Added experimental API to allow generic customizations of the StaticLayout.Builder used for the title text
Example usage:

```
collapsingToolbarLayout.setStaticLayoutBuilderConfigurer(
    builder ->
        builder.setLineBreakConfig(
            new LineBreakConfig.Builder()
                .setLineBreakWordStyle(LineBreakConfig.LINE_BREAK_WORD_STYLE_PHRASE)
                .build()));
```

PiperOrigin-RevId: 455625977
2022-06-23 18:32:33 +00:00
pekingme
3fdfb6e230 [I18n] Updated translated strings. We know how to say "Cancel" now :)
PiperOrigin-RevId: 454915686
2022-06-14 12:36:12 -07:00
pekingme
ecb6284a8b [Shape] Fixed overlapping of compat shadow of inner corners.
Resolves https://github.com/material-components/material-components-android/issues/1388

PiperOrigin-RevId: 454893622
2022-06-14 10:21:03 -07:00
conradchen
fd5ee4a989 [Snackbar] Avoid update layout if bottom margins for anchor view does not change
Whenever the anchor view is being relaid out, we will try to update the bottom margin of the snack bar, which may cause the anchor view be relaid out again, thus an infinite loop. Avoids updating margins if the bottom margin for anchor view doesn't change to fix the issue.

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

PiperOrigin-RevId: 454885847
2022-06-14 10:19:33 -07:00
conradchen
051410b7ef [TextField] Stop saving/restoring TextInputLayout's themeable fields
Saving/restoring themeable fields will cause problems when the view is recreated, because those fields will be restored to the value resolved from the context before the recreation, instead of the current context. For example, when the device locale changes, those fields will still be restored to the previous locale instead of the new one.

It's a general practice in Android framework and AndroidX not to save/restore themeable fields. If clients need this, they should implement their own logic.

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

PiperOrigin-RevId: 454708278
2022-06-13 16:15:10 -07:00
conradchen
687e73590d [TopAppBar] Exclude gone views from scroll range calculation
Resolves https://github.com/material-components/material-components-android/issues/2709

PiperOrigin-RevId: 454163860
2022-06-10 16:38:51 -07:00
leticiars
254abc58b8 [RadioButton] Refactored button tint color resource and updated docs
PiperOrigin-RevId: 453664804
2022-06-09 13:41:56 -07:00
rightnao
a601107868 [MaterialButton] Add methods to not toggle checked state on buttons on click
Resolves https://github.com/material-components/material-components-android/issues/2291

PiperOrigin-RevId: 453569861
2022-06-07 18:53:01 -07:00
leticiars
8dd9c7e30c [Checkbox] Added support for error state.
PiperOrigin-RevId: 453496914
2022-06-07 18:52:10 -07:00