1090 Commits

Author SHA1 Message Date
rightnao
77cabd0cf5 [Catalog] Update Lists demo to re-use viewholder when calling adapter.notifyItemChanged
PiperOrigin-RevId: 864964451
2026-02-03 20:28:42 +00:00
Material Design Team
9b413fcfc4 [Catalog] Make SearchView in Catalog full-screen
This change removes the fitsSystemWindows attribute in the main search demo fragment, which allows the search view to span full-screen, like other demos.

PiperOrigin-RevId: 859163506
2026-01-21 21:14:40 +00:00
rightnao
845a0e385a [Lists] Update state colors for label styles and update demos so ListItemCardView children will duplicate and pass on its parent state
PiperOrigin-RevId: 856272316
2026-01-14 20:57:03 +00:00
rightnao
5cb1500477 [Catalog] Update List docs and demo to be more clear on the primary action triggered corresponding with the growing element in the list swipe for a11y
Resolves https://github.com/material-components/material-components-android/issues/4992

PiperOrigin-RevId: 854315377
2026-01-12 16:17:32 +00:00
Material Design Team
67bd159133 [Catalog] Fix initial content description of the navigation drawer toggle in demos
Without calling `syncState()`, the `ActionBarDrawerToggle` defaults to the "Navigate up" description, ignoring the custom "Show navigation drawer" description until the user interacts with the drawer.

PiperOrigin-RevId: 853203850
2026-01-08 17:57:23 +00:00
pekingme
33ff7ce403 [Catalog] Internal cleanup
PiperOrigin-RevId: 852898414
2026-01-08 17:48:57 +00:00
rightnao
4dba971326 [Catalog] Fix MultiSectionListDemoFragment to correctly read view type
Resolves https://github.com/material-components/material-components-android/issues/4987

PiperOrigin-RevId: 852363363
2026-01-05 19:47:20 +00:00
Material Design Team
dd70ef92df [Catalog] Add tooltips to FABs and expand/collapse button
PiperOrigin-RevId: 852252718
2026-01-05 19:46:36 +00:00
rightnao
504300d37e [Lists] Support start/end reveal gravity in ListItemLayout
PiperOrigin-RevId: 846460595
2025-12-19 13:52:24 +00:00
kendricku
cd3f114a3f [Release] Updated minSdkVersion to 23.
PiperOrigin-RevId: 845841935
2025-12-18 15:24:52 +00:00
dependabot[bot]
8ba9d8bfb0 [Internal][Gradle] (deps): Bump org.jetbrains.kotlin.android from 2.1.21 to 2.2.20 in /catalog
Resolves https://github.com/material-components/material-components-android/pull/4950

  - 7187d69a254f24865f9df901710d5ccec0316cd2 by dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

PiperOrigin-RevId: 845744757
2025-12-17 15:14:12 +00:00
hunterstich
71f014fa41 [Snackbar] Added optional close icon
PiperOrigin-RevId: 845256053
2025-12-17 14:23:55 +00:00
rightnao
d5934ee5ba [Lists] Support skipping the open swipe state so clients can go straight to the primary action
PiperOrigin-RevId: 843871144
2025-12-15 13:55:28 +00:00
rightnao
75f0a4e812 [Lists] Add getSwipeState method and demo, and refactored to set necessary swipe elements before drag so they are available for programmatic swipes
PiperOrigin-RevId: 842819821
2025-12-12 12:43:12 +00:00
rightnao
c24017b4fc [Lists] Create expandable demo
PiperOrigin-RevId: 836818695
2025-12-02 15:09:25 +00:00
leticiars
fb64362c9f [Catalog] Update button demos so all buttons are using the updated styles.
PiperOrigin-RevId: 836761765
2025-12-02 15:07:41 +00:00
rightnao
1dbfdd74d5 [Lists] Make SwipeableListItem and RevealableListItem public and add swipe state callback
PiperOrigin-RevId: 836752108
2025-12-02 15:05:54 +00:00
rightnao
93ae7307a0 [Lists] Add styles and theme overlays for material icon buttons inside lists
PiperOrigin-RevId: 834834478
2025-11-24 12:43:02 -08:00
rightnao
6310274b72 [List][Catalog] Address a11y issues
PiperOrigin-RevId: 834524481
2025-11-24 12:42:08 -08:00
rightnao
176e92d3c3 [Lists] Support RTL swiping
PiperOrigin-RevId: 833469324
2025-11-19 08:29:02 -08:00
rightnao
3c1a61c3dd [Lists] Add styles for control elements in lists
PiperOrigin-RevId: 832010671
2025-11-17 21:08:16 +00:00
rightnao
692bd113ad [Lists] Add more optional styles and update demos to show more variety of sample list content
PiperOrigin-RevId: 831979827
2025-11-17 21:05:48 +00:00
manabu-nakamura
861ec3f220 [Catalog] Use wrap overflowMode for button groups in theme picker
Resolves https://github.com/material-components/material-components-android/pull/4926

  - c6ded3d0aed2105cf3981f3531c9c4da4dcd0510 by manabu-nakamura <ma.nakamura@gmail.com>

PiperOrigin-RevId: 830954339
2025-11-11 18:51:01 +00:00
rightnao
07a3be50c2 [Lists] Add swipe for action state
PiperOrigin-RevId: 828603206
2025-11-07 17:57:33 +00:00
pfthomas
6c4db77711 [MaterialTimePicker] Use ViewCompat.performHapticFeedback
Resolves https://github.com/material-components/material-components-android/issues/4948

PiperOrigin-RevId: 822672441
2025-10-31 18:48:11 +00:00
rightnao
400d695bc5 [Lists] Add ListItemRevealLayout, ListItemCardView, and relevant interfaces to introduce swiping in ListItemLayout
PiperOrigin-RevId: 818827578
2025-10-14 19:02:04 +00:00
rightnao
4e4e8f3388 [BottomSheet] Add support for Nested Scrolling with multiple nested scroll children.
PiperOrigin-RevId: 817350806
2025-10-10 19:10:21 +00:00
leticiars
20f381dda8 [Catalog][FAB Menu][a11y] Make sure focus stays trapped within the menu while the FAB menu is open.
PiperOrigin-RevId: 816745733
2025-10-10 18:10:07 +00:00
hunterstich
d24edd1ee9 [Snackbar] Added snackbar catalog demo
Resolves https://github.com/material-components/material-components-android/issues/4939

PiperOrigin-RevId: 816329734
2025-10-07 19:56:41 +00:00
Material Design Team
5c0e8dd60b [Card] Update card swipe dismiss string to clarify key names on the demo screen
The string for dismissing a card now specifies "Delete (Mac) / Backspace (Windows)" instead of just "the Delete key" to be more precise across different operating systems.

PiperOrigin-RevId: 815830469
2025-10-07 19:54:28 +00:00
Material Design Team
fbb3320244 [Card][A11y] Add keyboard and accessibility dismiss support to CardSwipeDismissFragment
PiperOrigin-RevId: 813703303
2025-10-07 19:50:27 +00:00
rightnao
d06eed1429 [Search][A11y] Allow keyboard navigation between searchbar and other components
PiperOrigin-RevId: 811869184
2025-09-30 18:24:09 +00:00
Material Design Team
11fafd96b6 [Card][A11y] Adds keyboard drag and drop support to the card demo fragment
This change introduces an `OnKeyboardDragListener` interface to handle keyboard-driven drag interactions. The `CardViewHolder` now listens for keyboard events (Enter/DPAD) to toggle and perform card movements, while the `CardAdapter` manages the state of the currently keyboard-dragged item and performs the swaps. The `ItemTouchHelperCallback` is updated to integrate with the new keyboard drag functionality.

PiperOrigin-RevId: 807222398
2025-09-18 16:46:10 +00:00
Material Design Team
fb26da61e6 [Menu][A11y] Fix context menu keyboard controls in Menu demo
Previously, pressing Enter on the context menu TextView in the menu demo would incorrectly open the menu. Additionally, pressing Ctrl+Enter would open the menu as a dialog, inconsistent with the floating menu style seen on long-press.

This change updates the OnKeyListener to:

Ignore Enter/DPAD_CENTER/Space key presses unless Ctrl is also held down.
When Ctrl+Enter is detected on API 24+, use showContextMenu(x, y) to display the menu as a floating menu centered on the view. This aligns its appearance with the long-press behavior.
On API < 24, fall back to showContextMenu(), which displays the menu as a dialog.

PiperOrigin-RevId: 806198204
2025-09-18 16:43:59 +00:00
Material Design Team
98a73a61d2 [TopAppBar][A11y] Improve keyboard navigation in TopAppBar catalog demos
The NestedScrollView in the Top App Bar demos would incorrectly receive keyboard focus. While this allowed for keyboard scrolling, the scroll container itself is not an interactive element and shouldn't be a focus stop.

This change fixes the issue by making the content within the scroll view focusable. The text content has been split into multiple, clickable TextViews. This makes the TextViews interactive elements, allowing them to correctly receive keyboard focus and improving the accessibility of the demos.

The logic for this has been extracted into a DemoUtils.setupClickableContentText method and applied across the relevant Top App Bar and Side Sheet demos.

PiperOrigin-RevId: 804881130
2025-09-18 16:42:21 +00:00
Material Design Team
4852ebcf2f [Menu][A11y] Update Menu Catalog Demo to use Ctrl + Enter for Context Menu
The context menu in the Menu catalog demo now opens when `Ctrl + Enter` is pressed on a keyboard, instead of just `Enter`. The description text has also been updated to reflect this change.

PiperOrigin-RevId: 802901209
2025-09-18 16:41:22 +00:00
Material Design Team
59f0fc5f41 [SideSheet][A11y] Improve keyboard navigation in SideSheet catalog demos
The NestedScrollView in the side sheet demos would incorrectly receive keyboard focus. While this allowed for keyboard scrolling, the scroll container itself is not an interactive element and shouldn't be a focus stop.

This change fixes the issue by making the content within the scroll view focusable. The text content has been split into multiple TextViews, each with an OnClickListener that shows a Toast. This makes the TextViews interactive elements, allowing them to correctly receive keyboard focus and improving the accessibility of the demos.

PiperOrigin-RevId: 801744921
2025-09-18 16:39:31 +00:00
Material Design Team
273e59bc2c Automated g4 rollback of changelist 800115239
PiperOrigin-RevId: 800694554
2025-08-29 11:46:59 -07:00
rightnao
14a6267605 [Lists] Add selector for optional leading icon
PiperOrigin-RevId: 800665410
2025-08-29 11:46:11 -07:00
pfthomas
d241d48bb0 [TimePicker][a11y] Error handling update
- properly show the chip background color when selected
- add error state with message when the hour/minute is incorrect, giving the user a visual feedback instead of just preventing inputting an incorrect value
- add vibration and beep on error or max length reached

PiperOrigin-RevId: 800583067
2025-08-29 11:45:22 -07:00
pekingme
7c66a2ef94 [ButtonGroup] Added the "wrap" overflow mode.
If the "wrap" overflow mode is in use, the button group will wrap the buttons that don't fit in one row to more rows below.

PiperOrigin-RevId: 800551513
2025-08-29 11:44:37 -07:00
Material Design Team
8dd5a81086 [Menu][A11y] Make context menu TextView focusable on Menu demo screen
This allows keyboard users to navigate to the TextView and trigger the context menu using the keyboard, improving accessibility within the demo.

PiperOrigin-RevId: 800382654
2025-08-29 11:43:55 -07:00
Material Design Team
86eddaad1a Automated g4 rollback of changelist 800097689
PiperOrigin-RevId: 800115239
2025-08-27 13:43:59 -07:00
Material Design Team
91ec6d36c8 Automated g4 rollback of changelist 797365811
PiperOrigin-RevId: 800097689
2025-08-27 13:42:35 -07:00
Material Design Team
b13d967f0b Automated g4 rollback of changelist 799921970
PiperOrigin-RevId: 799988158
2025-08-27 13:41:49 -07:00
pfthomas
d2cce659d1 [TimePicker][a11y] Error handling update
- properly show the chip background color when selected
- add error state with message when the hour/minute is incorrect, giving the user a visual feedback instead of just preventing inputting an incorrect value
- add vibration and beep on error or max length reached

PiperOrigin-RevId: 799921970
2025-08-27 13:41:00 -07:00
rightnao
fe1c0d6ca1 [Catalog][NavigationDrawer] Update nav drawer demo to use dispatchKeyEvent instead of onKeyDown since onKeyDown can sometimes be consumed by a view with focus
PiperOrigin-RevId: 797825692
2025-08-27 13:36:35 -07:00
Material Design Team
89ad742646 Internal change
PiperOrigin-RevId: 797365811
2025-08-27 13:34:57 -07:00
rightnao
c38892019c [Lists] Updating List catalog demo to spec
PiperOrigin-RevId: 797102136
2025-08-20 14:57:05 +00:00
pubiqq
78189012da [BottomNavigation] Fix navigation item layout in non-compact windows
Resolves https://github.com/material-components/material-components-android/pull/4793

  - 7277b3745c15b6058b59009380d3ce45533a76d2 by pubiqq <serj.ese@gmail.com>

PiperOrigin-RevId: 796946899
2025-08-20 14:53:17 +00:00