591 Commits

Author SHA1 Message Date
conradchen
868f8aaba3 [Tab] Fix setting tab indicator and its full-width flag
1. When a new tab indicator drawable is set, we didn't correctly restore the previous set indicator height to the new drawable, or set the drawing bound to the intrinsic height of the drawable, if the indicator height was not specified. This result in a 0-height drawing bound after setting the tab indicator, which makes it disappear and can never go back if the tab indicator gravity is not "stretch" (which will recalculate the height after moving the indicator). Fixes this by correctly set the drawing bounds after a new tab indicator drawable is set.

2. After we set full-width flag of tab indicator, the width won't be updated until we move the tab indicator. Fixes this by explicitly triggering the recalculation of tab indicator's drawing bound after changing the flag.

Resolves: https://github.com/material-components/material-components-android/issues/2354
PiperOrigin-RevId: 397823617
2021-09-21 08:14:25 -07:00
leticiars
ed0567d26d [Catalog] Removed MaterialComponents references from musicplayer package.
PiperOrigin-RevId: 396367575
2021-09-16 09:56:45 -07:00
afohrman
f01e6a849d [M3][Dialog] Add M3 styles for Dialog.
PiperOrigin-RevId: 395775598
2021-09-15 12:31:13 -07:00
jeremymuhia
054f1dba1e [M3][FAB] add tertiary FAB color variant
PiperOrigin-RevId: 395721687
2021-09-15 12:22:52 -07:00
dsn5ft
9534612864 [M3][Catalog] Added compress effect Top App Bar demo
PiperOrigin-RevId: 395519586
2021-09-08 17:42:22 -04:00
dsn5ft
7463f9a294 [M3][Catalog] Added Medium and Large collapsing toolbar Top App Bar demos
PiperOrigin-RevId: 395508118
2021-09-08 17:41:35 -04:00
pekingme
5c2a5920d5 [M3][ProgressIndicator] Created progress indicator's M3 styles.
PiperOrigin-RevId: 394263058
2021-09-01 17:07:57 -04:00
conradchen
cdafe752e3 [M3][Bottomsheet] Create bottom sheet styles
PiperOrigin-RevId: 394258956
2021-09-01 17:07:04 -04:00
dsn5ft
e776908bd2 [M3][Catalog] Updated some demo references to Material3 styles
PiperOrigin-RevId: 394005182
2021-08-31 12:01:43 -04:00
serniebanders
492e37f46f [M3] Chip style updates
PiperOrigin-RevId: 393994946
2021-08-31 10:46:09 -04:00
leticiars
7abf166170 [Catalog] Adding android:exported to catalog main activity.
PiperOrigin-RevId: 393424488
2021-08-27 17:30:38 -04:00
pfthomas
0998e9d018 [M3][Menu] Create M3 styles
PiperOrigin-RevId: 393191642
2021-08-27 14:51:55 -04:00
serniebanders
7f597a711c [M3][Chip] Create M3 styles
PiperOrigin-RevId: 393154962
2021-08-26 15:10:34 -04:00
conradchen
fabb5ea498 [M3][Divider] Create M3 styles
PiperOrigin-RevId: 393151662
2021-08-26 15:09:37 -04:00
jeremymuhia
5e98a056c1 [M3][Catalog][FAB] update FAB demos
PiperOrigin-RevId: 393138444
2021-08-26 14:45:19 -04:00
conradchen
2901012af5 [M3][DatePicker] Create M3 styles
PiperOrigin-RevId: 392982386
2021-08-26 14:43:23 -04:00
leticiars
864ef024ab [Catalog] Music player demo updates.
PiperOrigin-RevId: 392884977
2021-08-25 14:58:02 -04:00
conradchen
e5fb9d1fbd [M3][Card] Create M3 styles
PiperOrigin-RevId: 392875925
2021-08-25 14:57:05 -04:00
hunterstich
999b24783c [M3][NavigationBar] Add new navigation bar styles.
PiperOrigin-RevId: 392688526
2021-08-24 15:52:44 -04:00
pfthomas
6bfa5842b9 [M3][Button] Create M3 styles
PiperOrigin-RevId: 392680177
2021-08-24 15:51:48 -04:00
conradchen
febe25707c [M3][DynamicColor] Create dynamic color support in M3
PiperOrigin-RevId: 392425782
2021-08-23 09:46:04 -07:00
dsn5ft
ae20031806 [M3][Catalog] Update Catalog naming to Material 3
PiperOrigin-RevId: 392012855
2021-08-23 09:39:13 -07:00
dsn5ft
fb522a576b [M3][Catalog] Fixed filled text field demo style
PiperOrigin-RevId: 391978584
2021-08-23 09:34:25 -07:00
conradchen
60782a5d9b [M3][Tab] Create M3 styles
PiperOrigin-RevId: 391849752
2021-08-23 09:29:03 -07:00
hunterstich
7bcb917862 [M3][Typography] Update Font catalog demo to use new typescale.
PiperOrigin-RevId: 391820169
2021-08-23 09:26:49 -07:00
conradchen
edbc4e1f64 [M3][Textfield] Create M3 styles
PiperOrigin-RevId: 391773145
2021-08-23 09:22:14 -07:00
dsn5ft
f428f20829 [M3][Color] Updated colorPrimaryDark to point to colorPrimary
Also updated Catalog edge-to-edge logic to handle "light status bar", and default to edge-to-edge enabled for Q+

PiperOrigin-RevId: 391763801
2021-08-23 09:21:21 -07:00
dsn5ft
18490ff82d [M3][Top App Bar] Added new AppBarLayout, CollapsingToolbarLayout, and Toolbar styles and updated Catalog pages + demos
PiperOrigin-RevId: 391755524
2021-08-23 09:20:24 -07:00
dsn5ft
5d940f1ff8 [M3][Catalog] Update Catalog theme(s) to Material3 and fix Material3 date/time picker theme overlays
PiperOrigin-RevId: 391581833
2021-08-23 09:17:02 -07:00
Material Design Team
cbf7bcad59 Internal change
PiperOrigin-RevId: 386513223
2021-07-28 14:29:52 -04:00
leticiars
cc4a6040fd [Catalog] Small updates to music player demo.
PiperOrigin-RevId: 385011921
2021-07-22 10:12:08 -04:00
dsn5ft
aaa0444308 [AppBarLayout] Added support for statusBarForeground lift on scroll elevation overlay for edge to edge mode and updated demo
Helpful for the case where the Top App Bar text/icons are still visible underneath a transparent status bar, when the Top App Bar is scrolled up.

PiperOrigin-RevId: 384985602
2021-07-22 10:11:22 -04:00
conradchen
456f135627 [Button] Fix progress indicator is not shown when set as the icon
MaterialButton is using TextViewCompat.setCompoundDrawablesRelative() under the hood to implement setIcon() operation. TextViewCompat won't call its compound drawables' setVisible() method, on which we rely to start progress indicator drawables automatically.

Calls setVisible() explicitly to start progressing.

Also adds a demo to catalog.

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

PiperOrigin-RevId: 383483364
2021-07-08 15:58:13 +00:00
dniz
9ebf1a1387 [CollapsingToolbarLayout] Added option to force always applying system window inset top regardless of layout_height
PiperOrigin-RevId: 382286923
2021-07-01 06:49:33 -07:00
leticiars
782dffa8b7 [Divider] Added new Divider component to the library and Divider doc.
PiperOrigin-RevId: 381858673
2021-06-28 13:08:28 -07:00
leticiars
acf08f7640 [Divider] Added divider demo in catalog
PiperOrigin-RevId: 381249847
2021-06-28 12:47:45 -07:00
afohrman
a536a8068d [Motion] Extracted music player app into its own package and made transition demo depend on it.
PiperOrigin-RevId: 381100447
2021-06-24 13:04:57 -07:00
Material Design Team
5ec07aa65b Update Fragment libraries from androidx-platform-dev with build id #7476539(2021-06-20).
PiperOrigin-RevId: 380909299
2021-06-24 13:03:04 -07:00
haodong
209bad3299 [ProgressIndicator] Enabled switch from indeterminate mode to determinate mode while visible.
Resolves https://github.com/material-components/material-components-android/issues/1921

PiperOrigin-RevId: 378944543
2021-06-14 18:33:33 +00:00
afohrman
720088c5c2 [BottomNavigationView] Added deprecation Javadoc for BottomNavigationView#OnNavigationItemSelectedListener and BottomNavigationView#OnNavigationItemReselectedListener.
The listeners were deprecated in favor of `NavigationBarView#OnItemSelectedListener` and `NavigationBarView#OnItemReselectedListener`, but deprecation documentation was never added, so it's unclear what developers should use instead.

Also removed internal usages of these deprecated usages in the catalog and in tests.

PiperOrigin-RevId: 378021534
2021-06-09 18:20:52 +00:00
afohrman
c995ae200e [BottomAppBar] Improved Bottom App bar demo controls.
Changed the demo to use toggle button groups instead of a combination of "manual toggle buttons", regular buttons, and AppCompat toggle buttons. This creates consistency throughout the demo and makes it easier to understand which demo control modifies which feature of the BottomAppBar.

Also:
- Changed the hide on scroll demo control to use a switch, as opposed to a ToggleButton. It was previously very hard to tell which position was on and which was off; a switch does a better job of communicating on/off states.
- Added labels for the toggle groups, which makes it easier to understand which demo control applies to which aspect of the BAB.
PiperOrigin-RevId: 377132368
2021-06-02 16:47:39 -04:00
conradchen
65e99d02ee [Catalog] Make card view demo paddings aligned with spec
PiperOrigin-RevId: 375498559
2021-05-24 17:21:54 -07:00
conradchen
415ed744b0 [Catalog] Remove theme switcher implementation
PiperOrigin-RevId: 375473686
2021-05-24 17:09:47 -07:00
conradchen
2a23ef4050 [Catalog] Fix system navigation bar demo
PiperOrigin-RevId: 375091345
2021-05-21 14:09:31 -07:00
conradchen
ce84b5826c [Catalog] Replace theme switchers with preferences screen
PiperOrigin-RevId: 374948274
2021-05-21 11:49:15 -07:00
conradchen
7adfd93d80 [TooltipDrawable] Adding android:textColor support
PiperOrigin-RevId: 374887222
2021-05-20 14:03:30 -07:00
conradchen
6e7be6070c [Catalog] Add shape corner size preference to preferences screen
Also changes "shape" preference to "shape corner family" preference, and adds default options to both preferences.

PiperOrigin-RevId: 374704273
2021-05-19 13:20:30 -07:00
conradchen
832e43f7a5 [Catalog] Add shape preference to preferences screen
PiperOrigin-RevId: 374643731
2021-05-19 10:57:49 -07:00
conradchen
967745a2ea [Catalog preference] Fix catalog preference state restoring issue
PiperOrigin-RevId: 374268183
2021-05-19 10:45:47 -07:00
conradchen
3aa76dafaa [Catalog] Implement app preferences mechanism in Catalog
PiperOrigin-RevId: 373572141
2021-05-14 15:27:08 -04:00