534 Commits

Author SHA1 Message Date
Material Design Team
a200a5ef17 [NavigationRail] Moves OnNavigationItem listeners to the NavigationBarView class
to be easier used by developers and other libraries

An example of where the current implementation fails is in Jetpack Navigation component where we rely on setOnNavigationItemSelectedListener and the similar methods in NavigationBarView (setOnItemSelectedListener) are protected.

PiperOrigin-RevId: 367467206
2021-04-08 20:43:35 -04:00
connieshi
948738e618 [Badge][Toolbar] Fix badge offset bug when attached and detached from a menu item on a toolbar.
Added switch to toggle show/hide edit menu item and added button to increment badge number.

Moved logic to add badgedrawable to onCreateOptionsMenu so that a new badgedrawable is NOT added every time onPrepareOptionsMenu is called (e.g. opening the overflow menu)

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

PiperOrigin-RevId: 365033209
2021-03-25 11:28:18 -04:00
leticiars
81273acb26 [TextInputLayout][LargeScreens] Adding default, max and min widths for text fields to optimize for large screens.
PiperOrigin-RevId: 363660219
2021-03-18 12:54:05 -04:00
raajkumars
6a37a553e7 [Catalog] Updated catalog to showcase header view inside a Navigation Rail View.
PiperOrigin-RevId: 359796624
2021-03-03 13:22:58 -05:00
raajkumars
ae8b1858f3 [Catalog] Updated catalog to demonstrate navigation rail in compact style.
PiperOrigin-RevId: 359624175
2021-03-03 13:21:43 -05:00
raajkumars
4ff1440995 [Catalog] Updated Navigation Rail catalog demo to showcase a colored navigation rail with animated icons.
PiperOrigin-RevId: 359598831
2021-03-03 13:20:52 -05:00
raajkumars
6cd0737807 [Catalog] Updated Navigtaion Rail catalog demo to showcase label visibility mode and menu gravity.
PiperOrigin-RevId: 359538339
2021-03-03 13:13:38 -05:00
dniz
cbf528e3a6 [MaterialToolbar] Added support for centering title and subtitle
Resolves https://github.com/material-components/material-components-android/issues/2011

PiperOrigin-RevId: 359360955
2021-03-03 12:37:29 -05:00
raajkumars
547979e121 [Catalog] Updated catalog demo to showcase navigation rail component.
PiperOrigin-RevId: 359086242
2021-02-25 09:46:33 -05:00
isabellekim
fb96aa8592 [Catalog] Update theme switcher to have customizable radio button styling
PiperOrigin-RevId: 358218881
2021-02-18 14:36:19 -08:00
raajkumars
e13610e589 [Navigation Rail] Added Navigation Rail component to the library.
PiperOrigin-RevId: 355235369
2021-02-04 20:49:41 -05:00
isabellekim
9c2c419b2a [Color] Update theme switcher to have customizable text for the description above the radio buttons for choosing color
PiperOrigin-RevId: 355223824
2021-02-02 15:55:35 -05:00
johnsonmh
397152d8aa [Buttons] Explicitly set buttons focusable property.
PiperOrigin-RevId: 351594749
2021-01-14 09:48:11 -05:00
afohrman
8e79c7ea1c [Motion] Added theming to MaterialFade transition.
PiperOrigin-RevId: 351180119
2021-01-11 21:15:56 -05:00
cketcham
c15139a5c3 [BottomSheet] Automatically enable insets for ThemeOverlay style
Because the BottomSheet could be shown under the navigation bar if it's transparent or translucent, it's best to ensure insets are added. If no insets are added, views can end up behind the navigation bar which prevents any interaction.

PiperOrigin-RevId: 348470697
2021-01-06 13:28:56 -05:00
cketcham
b1812b9a6b Internal Change
PiperOrigin-RevId: 347042445
2020-12-11 14:47:53 -05:00
cketcham
3037cf046c Automated g4 rollback of changelist 343006492
PiperOrigin-RevId: 347038837
2020-12-11 14:45:45 -05:00
haodong
e5375fcb69 [ProgressIndicator] Renamed indeterminateAnimationType enums "seamless" and "spacing".
PiperOrigin-RevId: 345467359
2020-12-03 14:46:51 -05:00
haodong
80b5cf61b3 [ProgressIndicator] Removed unnecessary style attributes from catalog.
PiperOrigin-RevId: 344914335
2020-12-01 09:29:20 -05:00
haodong
4ab8cb1d4c [ProgressIndicator] Added sized styles for circular type.
PiperOrigin-RevId: 344141496
2020-11-25 10:26:48 -05:00
dniz
5154eeae32 [Motion] Applied easing, duration, and path theme attributes to MaterialContainerTransform
Also removed custom dagger container transform config from Catalog so that these motion theme changes are observable

PiperOrigin-RevId: 344118337
2020-11-25 10:25:26 -05:00
isabellekim
a8156be40b [Catalog] Make demo links use minHeight instead of specifying height so they won't be truncated at large font sizes.
PiperOrigin-RevId: 343854737
2020-11-23 13:21:44 -05:00
haodong
968fb195dc [ProgressIndicator] Updated track thickness used in standalone demo as 2.5 dp.
PiperOrigin-RevId: 343532292
2020-11-20 15:07:33 -05:00
haodong
9d7ae04e0e [ProgressIndicator] Renamed some attributes.
PiperOrigin-RevId: 343299956
2020-11-19 12:33:42 -05:00
cketcham
b163458a3a [BottomSheet] Updates the way BottomSheet handles insets
This updates ThemeOverlay styles to prevent drawing a transparent nav bar and updates BottomSheetBehavior and BottomSheetDialog to handle insets correctly so content isn't drawn behind the status bar or navigation bar.

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

PiperOrigin-RevId: 343006492
2020-11-18 10:40:16 -05:00
afohrman
151be9bb11 [Motion] Added basic music player and container transform to hero music player demo app.
Added a music player to the hero music player demo app, and a container transition from the FAB to the music player. The music player has a progress indicator and rewind, play, fast forward and volume controls; at this point, they all do nothing.

The transition uses a View to View container transform transition to transition from the FAB to the music player.

As of now, the transition does not touch the album view - it just jumps to underneath the music player for now.

PiperOrigin-RevId: 342915096
2020-11-17 15:54:49 -05:00
Drew Hamilton
c4f7de167f [ShapeableImageView] Support contentPadding
Resolves https://github.com/material-components/material-components-android/pull/1871

GIT_ORIGIN_REV_ID=42b91686512ed77d38f5a70a26cc52157ff4184b
Co-authored-by: ymarian <38727469+ymarian@users.noreply.github.com>
PiperOrigin-RevId: 342906676
2020-11-17 15:52:38 -05:00
haodong
be6ed3da48 [ProgressIndicator] Updated class visibility.
PiperOrigin-RevId: 342664697
2020-11-16 16:40:34 -05:00
Drew Hamilton
af73a1771e [ShapeableImageView] Call invalidateOutline when shape is changed
Resolves https://github.com/material-components/material-components-android/pull/1769

PiperOrigin-RevId: 342118551
2020-11-14 10:12:36 -05:00
haodong
e1d979631d [ProgressIndicator] Combined attributes show/hideBehaviorLinear and show/hideBehaviorCircular.
PiperOrigin-RevId: 342086777
2020-11-14 10:07:06 -05:00
marianomartin
60767159dc [catalog] change fragment name to be one line max
PiperOrigin-RevId: 342085043
2020-11-14 10:05:24 -05:00
haodong
b1ef02a16b [ProgressIndicator] Cleaned up deprecated class and resources.
PiperOrigin-RevId: 342076767
2020-11-12 13:53:23 -05:00
dniz
ad1d173018 [Motion] Updated MaterialContainerTransform to support overshoot and added OvershootInterpolator, AnticipateOvershootInterpolator, and BounceInterpolator options to Catalog demos
Allows overshoot for the translation and width/height scale parts of the container transform's animation, not the fade part of the animation.

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

PiperOrigin-RevId: 341432972
2020-11-09 13:34:50 -05:00
gabin8
5642d5f200 [Catalog] Fixed crash in TransitionMusicAlbumDemoFragment
Resolves https://github.com/material-components/material-components-android/issues/1831
Resolves https://github.com/material-components/material-components-android/pull/1832

GIT_ORIGIN_REV_ID=0f265b4a5208d79c73c42c462b644b895e65b69a
PiperOrigin-RevId: 339482484
2020-10-29 15:18:05 -04:00
leticiars
c9f2caaf9d Automated g4 rollback of changelist 339130013
PiperOrigin-RevId: 339279131
2020-10-28 09:40:41 -04:00
hunterstich
4ae97e52fc [Motion] Added shared axis Activity demo to catalog
PiperOrigin-RevId: 339269694
2020-10-27 11:08:52 -07:00
connieshi
5398d6f6f8 [RadioButton] Update demo to add an enabled option to the radio group that previously only contained disabled options.
PiperOrigin-RevId: 339234331
2020-10-27 11:07:48 -07:00
Material Design Team
8f6b39d860 Automated g4 rollback of changelist 339053684
PiperOrigin-RevId: 339130013
2020-10-27 10:21:11 -07:00
Material Design Team
3059e2816e Suppress existing warnings for androidx @RestrictTo annotation
Cleanup change automatically generated by javacflume/refactory
Refactoring: java/com/google/devtools/staticanalysis/errorprone:RestrictToEnforcer_refactoring
PiperOrigin-RevId: 339077195
2020-10-27 10:19:27 -07:00
leticiars
948bb327f9 [ExposedDropdownMenu] Update paddings to match spec.
PiperOrigin-RevId: 339053684
2020-10-27 10:18:36 -07:00
haodong
8bc3f13079 [ProgressIndicator] Updated LINEAR type to LinearProgressIndicator in catalog.
PiperOrigin-RevId: 338757151
2020-10-27 10:17:10 -07:00
hunterstich
0afcb48f14 [TabLayout] Automated g4 rollback of changelist 337128442.
*** Reason for rollback ***

[TabLayout] Roll forward with dot indicator fix

*** Original change description ***

Automated g4 rollback of changelist 337092676

PiperOrigin-RevId: 337484043
2020-10-16 05:54:50 -07:00
hunterstich
49ad52288c [Motion] Updated FadeThroughProvider and FadeProvider to restore target's original alpha value.
Resloves https://github.com/material-components/material-components-android/issues/1701

PiperOrigin-RevId: 337374791
2020-10-16 05:53:46 -07:00
haodong
c3d59395a5 [ProgressIndicator] Update GM testing and catalog.
PiperOrigin-RevId: 337198418
2020-10-15 13:37:00 -07:00
haodong
f021ef5ee2 [ProgressIndicator] Updated MDC catalog to replace ProgressIndicator (CIRCULAR type) with CircularProgressIndicator.
PiperOrigin-RevId: 337190254
2020-10-15 13:35:39 -07:00
hunterstich
91589f4c24 Automated g4 rollback of changelist 337092676
PiperOrigin-RevId: 337128442
2020-10-15 13:28:59 -07:00
haodong
113bff7dd7 [ProgressIndicator] Use CircularProgressIndicatorSpec in CIRCULAR type.
PiperOrigin-RevId: 337106191
2020-10-15 13:27:53 -07:00
hunterstich
f0a80c4e41 [TabLayout] Automated g4 rollback of changelist 336764852.
*** Reason for rollback ***

Roll forward with fix

*** Original change description ***

Automated g4 rollback of changelist 336704515

PiperOrigin-RevId: 337092676
2020-10-15 13:25:34 -07:00
haodong
0a75c746ff [ProgressIndicator] Added CircularProgressIndicator and CircularProgressIndicatorSpec.
PiperOrigin-RevId: 337009157
2020-10-15 13:24:45 -07:00
connieshi
9487c33b8a Automated g4 rollback of changelist 336347365
PiperOrigin-RevId: 336978123
2020-10-15 13:23:56 -07:00