material-components / material-components/material-components-android
[Floating ToolBar] Support scrolling
@imhappi is already working on this.
Since Dec 11, 2024.
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
**Description:** Items in the Floating Toolbar are getting cut off when the screen cannot accommodate the entire Toolbar.

**Expected Behavior:**
The Floating Toolbar should automatically enable scrolling in both horizontal directions to ensure all icons are accessible. This scrolling capability should be integrated into the Floating Toolbar, and it should include fading effects on both ends to indicate more content is available. Manually adding a horizontal scroll (Hscroll) view does not work properly because scrolling conflicts with the centered aspect that the ToolBar has both vertically and horizontally, thus making it not possible to scroll through all of them. It would also be much easier to have the functionality built into the component.
**Steps to Reproduce:**
1. Implement a Floating Toolbar with several items.
2. Display the Floating Toolbar on a device with a screen size that cannot fully accommodate the toolbar's width.
3. Observe that items get cut off instead of being scrollable or otherwise accessible.
**Android API Version:** 35
**Material Library Version:** 1.13.0-alpha08
**Device:** Samsung Galaxy S23
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.