material-components / material-components/material-components-android
How to get ExtendedFloatingActionButton to behave similar to FloatingActionButton when interacting with CoordinatorLayout and scrolling?
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
Trying to use the new `ExtendedFloatingActionButton`. It seems by default `ExtendedFloatingActionButton` acts differently from `FloatingActionButton` when interacting with `CoordinatorLayout`. See here the red one is the typical `FloatingActionButton` and the 2 black ones are the `ExtendedFloatingActionButton` with exactly the same setup (except for colors and text).
What I need is for the black ones to hide away just like the red one does.

Here's the layout:
```
```
I see in source that there's a nested class `ExtendedFloatingActionButton.ExtendedFloatingActionButtonBehavior` and it seems to have maybe some properties that might be useful/related to this such as `autoHideEnabled` and `autoShrinkEnabled` but the class is protected and I can't figure out how it is meant to be accessed.
Please help.
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.
Research direction
Start by reading ExtendedFloatingActionButton.ExtendedFloatingActionButtonBehavior and the autoHideEnabled and autoShrinkEnabled properties mentioned in the issue, then compare its CoordinatorLayout interaction with FloatingActionButton. Reproduce the supplied layout and scrolling behavior; done means the extended buttons hide or otherwise match the requested FloatingActionButton behavior, with coverage for the demonstrated setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100