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
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
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
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
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
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
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
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
- 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
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
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
- 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